private static function sortReports ($a, $b){
    	$a = json_decode($a, true);
    	$b = json_decode($b, true);
    	
    	if ($a['value']['optional'] == $b['value']['optional']){
    		return 0;
    	}
    	else{
    		return ($a['value']['optional'] < $b['value']['optional']) ? -1 : 1;
    	}
    }
private static function sortReports ($a, $b){
    	$a = json_decode($a, true);
    	$b = json_decode($b, true);
    	
    	if ($a['value']['optional'] == $b['value']['optional']){
    		return 0;
    	}
    	else{
    		return ($a['value']['optional'] < $b['value']['optional']) ? -1 : 1;
    	}
    }
private static function sortReports ( $ a , $ b ) { $ a = json_decode ( $ a , true ) ; $ b = json_decode ( $ b , true ) ; if ( $ a [ 'value' ] [ 'optional' ] == $ b [ 'value' ] [ 'optional' ] ) { return 0 ; } else { return ( $ a [ 'value' ] [ 'optional' ] < $ b [ 'value' ] [ 'optional' ] ) ? - 1 : 1 ; } }
Report sorting function.
@param string $a JSON encoded report.
@param string $b JSON encoded report.
@return boolean Comparison result.
Report sorting function .