3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php if ( ! class_exists('SplFixedArray')) { return; } $array = range(1, 6); foreach ($array as $key => $value) { if ($value & 1) { unset($array[ $key ]); } } echo count(SplFixedArray::fromArray($array)), PHP_EOL; // 6 echo count(SplFixedArray::fromArray($array, false)), PHP_EOL; // 3
Output for 5.3.0 - 7.1.0
6 3
Output for 4.3.0 - 5.0.5, 5.1.1 - 5.2.17
Output for 5.1.0
Fatal error: fatal flex scanner internal error--end of buffer missed in /in/QpqjB on line 16
Process exited with code 255.