PHP - Calculate number of Business Days in Month

I have seen many solutions for this problem, but somehow everybody keeps complicating it. This is a VERY SIMPLE computation, just check it out:

 

function calculateWorkingDaysInMonth( $month = '',$year = '') {

$year = $year?$year:date('Y');

$month =$month?$month:date('m');

$daysinmonth=date('t', mktime(0, 0, 0, $month, 1, $year));

$business=0;

for ($i=1;$i<=$daysinmonth;$i++)

(date('w',mktime(0, 0, 0, $month, $i, $year))%6)?$business++:1;

return $business;

}