You can't call a javascript function in PHP directly.
But You can Call a Javascript function from outputted HTML by PHP. It means you can call the javaScript function on conditional. See Example Below:
$count= empty($_GET['count'])?0:$_GET['count']; if(empty($count)){ echo ''; }elseif($count<=10){ echo ''; }else{ echo ''; }
In this way, we call the JavasScript function in PHP.