3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = [1, 2, , 4, 9, 6, 1]; $ret = 1; foreach($array as $item){ $ret *= $item ? 1 : 0; } echo $ret;
Output for 7.1.0 - 7.1.23, 7.2.0 - 7.2.11
Fatal error: Cannot use empty array elements in arrays in /in/IDUBP on line 2
Process exited with code 255.
Output for 5.6.38
Parse error: syntax error, unexpected ',', expecting ']' in /in/IDUBP on line 2
Process exited with code 255.

preferences:
173.57 ms | 1395 KiB | 44 Q