3v4l.org

run code in 300+ PHP versions simultaneously
<?php function checkArray($array) { return count($array) === 0 ? "" : $array; } $yourArray = array('arr1',,'arr2'); $yourArray = checkArray($yourArray); var_dump($yourArray);
Output for 5.3.0 - 5.3.28, 5.4.0 - 5.4.27
Parse error: syntax error, unexpected ',', expecting ')' in /in/18CQR on line 7
Process exited with code 255.

preferences:
184.43 ms | 1395 KiB | 64 Q