3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php // Source: https://bugs.php.net/bug.php?id=66127 function crash() { set_error_handler(function () {}); $var = 1; trigger_error('error'); $var2 = $var; $var3 = $var; trigger_error('error'); } $items = new ArrayObject(); unset($items[0]); unset($items[0][0]); crash(); echo "Worked!\n";
Output for 5.4.8 - 5.4.12, 5.4.30 - 5.4.45, 5.5.14 - 5.6.28, 7.0.0 - 7.1.0
Notice: Undefined offset: 0 in /in/1kuOK on line 16 Notice: Indirect modification of overloaded element of ArrayObject has no effect in /in/1kuOK on line 17 Worked!
Output for hhvm-3.10.0 - 3.12.0
Notice: Undefined index: 0 in /in/1kuOK on line 16 Notice: Undefined index: 0 in /in/1kuOK on line 17 Worked!
Output for 5.4.13 - 5.4.29, 5.5.0 - 5.5.13
Notice: Undefined offset: 0 in /in/1kuOK on line 16
Process exited with code 139.
Output for 5.3.0 - 5.3.17, 5.4.0 - 5.4.7
Notice: Undefined offset: 0 in /in/1kuOK on line 16 Notice: Undefined offset: 0 in /in/1kuOK on line 17 Notice: Indirect modification of overloaded element of ArrayObject has no effect in /in/1kuOK on line 17 Worked!
Output for 5.3.18 - 5.3.22, 5.3.29
Notice: Undefined offset: 0 in /in/1kuOK on line 16 Notice: Indirect modification of overloaded element of ArrayObject has no effect in /in/1kuOK on line 17 Worked!
Output for 5.3.23 - 5.3.28
Notice: Undefined offset: 0 in /in/1kuOK on line 16 Worked!
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.2.17
Parse error: syntax error, unexpected T_FUNCTION, expecting ')' in /in/1kuOK on line 6
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1, 5.0.0 - 5.0.5
Parse error: parse error, unexpected T_FUNCTION, expecting ')' in /in/1kuOK on line 6
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error, expecting `')'' in /in/1kuOK on line 6
Process exited with code 255.