3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php 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]); echo "Okay\n"; 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/pc3kG on line 15 Notice: Indirect modification of overloaded element of ArrayObject has no effect in /in/pc3kG on line 16 Okay Worked!
Output for hhvm-3.10.0 - 3.12.0
Notice: Undefined index: 0 in /in/pc3kG on line 15 Notice: Undefined index: 0 in /in/pc3kG on line 16 Okay Worked!
Output for 5.4.13 - 5.4.29, 5.5.0 - 5.5.13
Notice: Undefined offset: 0 in /in/pc3kG on line 15 Okay
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/pc3kG on line 15 Notice: Undefined offset: 0 in /in/pc3kG on line 16 Notice: Indirect modification of overloaded element of ArrayObject has no effect in /in/pc3kG on line 16 Okay Worked!
Output for 5.3.18 - 5.3.22, 5.3.29
Notice: Undefined offset: 0 in /in/pc3kG on line 15 Notice: Indirect modification of overloaded element of ArrayObject has no effect in /in/pc3kG on line 16 Okay Worked!
Output for 5.3.23 - 5.3.28
Notice: Undefined offset: 0 in /in/pc3kG on line 15 Okay 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/pc3kG on line 5
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/pc3kG on line 5
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error, expecting `')'' in /in/pc3kG on line 5
Process exited with code 255.