3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $array = array(); for ($i = 0; $i < 1000000; $i++) { $array[$i] = true; } for ($j = 0; $j < 1000000; $j+=1000) { if (in-array($j,$array)) { } }
based on KWXC9
Output for 7.1.0
Notice: Use of undefined constant in - assumed 'in' in /in/mKDYF on line 10 Warning: A non-numeric value encountered in /in/mKDYF on line 10 Fatal error: Uncaught Error: Unsupported operand types in /in/mKDYF:10 Stack trace: #0 {main} thrown in /in/mKDYF on line 10
Process exited with code 255.
Output for 7.0.0 - 7.0.14
Notice: Use of undefined constant in - assumed 'in' in /in/mKDYF on line 10 Fatal error: Uncaught Error: Unsupported operand types in /in/mKDYF:10 Stack trace: #0 {main} thrown in /in/mKDYF on line 10
Process exited with code 255.
Output for 5.3.0 - 5.6.28
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 32 bytes) in /in/mKDYF on line 5
Process exited with code 255.
Output for 5.2.3 - 5.2.17
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 71 bytes) in /in/mKDYF on line 5
Process exited with code 255.
Output for 5.2.1 - 5.2.2
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 24 bytes) in /in/mKDYF on line 5
Process exited with code 255.
Output for 4.3.2 - 5.2.0
Notice: Use of undefined constant in - assumed 'in' in /in/mKDYF on line 10 Fatal error: Unsupported operand types in /in/mKDYF on line 10
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Notice: Use of undefined constant in - assumed 'in' in /in/mKDYF on line 10 Fatal error: Unsupported operand types in /in/mKDYF on line 10