3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function handler() { } function func() { set_error_handler('handler'); $var = 1; trigger_error('error'); $var2 = $var; $var3 = $var; trigger_error('error'); } $items = new ArrayObject(array(1)); unset($items[0]); unset($items[0][0]); func(); echo "Worked!\n";
Output for 5.3.18 - 5.3.22, 5.3.29, 5.4.8 - 5.4.12, 5.4.30 - 5.4.45, 5.5.14 - 7.2.0
Notice: Indirect modification of overloaded element of ArrayObject has no effect in /in/etAJE on line 20 Worked!
Output for 5.4.13 - 5.4.29, 5.5.0 - 5.5.13

Process exited with code 139.
Output for 5.2.1 - 5.3.17, 5.4.0 - 5.4.7
Notice: Undefined offset: 0 in /in/etAJE on line 20 Notice: Indirect modification of overloaded element of ArrayObject has no effect in /in/etAJE on line 20 Worked!
Output for 5.3.23 - 5.3.28
Worked!
Output for 5.0.0 - 5.2.0
Notice: Undefined offset: 0 in /in/etAJE on line 20 Worked!
Output for 4.3.2 - 4.4.9
Fatal error: Cannot instantiate non-existent class: arrayobject in /in/etAJE on line 17
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Cannot instantiate non-existent class: arrayobject in /in/etAJE on line 17