3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $a = new ArrayObject(); $b = array(); $a[null]['hurr'] = 'durr'; var_dump($a['epic_magic']); var_dump($b['epic_magic']); var_dump($c['epic_magic']); // Undefined var!! $d = array(); var_dump($a['epic_magic']); // more magic! var_dump($d['epic_magic']); $e = 'srsly?'; var_dump($a['epic_magic']); // srsly. var_dump($aaa); var_dump($aaa->output);
Output for 5.4.8 - 5.6.28, 7.0.0 - 7.1.0
Notice: Undefined index: epic_magic in /in/lLQoj on line 9 NULL Notice: Undefined index: epic_magic in /in/lLQoj on line 10 NULL Notice: Undefined variable: c in /in/lLQoj on line 11 NULL Notice: Undefined index: epic_magic in /in/lLQoj on line 14 NULL Notice: Undefined index: epic_magic in /in/lLQoj on line 15 NULL Notice: Undefined index: epic_magic in /in/lLQoj on line 18 NULL Notice: Undefined variable: aaa in /in/lLQoj on line 20 NULL Notice: Undefined variable: aaa in /in/lLQoj on line 21 Notice: Trying to get property of non-object in /in/lLQoj on line 21 NULL
Output for hhvm-3.10.0 - 3.12.0
Notice: Undefined index: epic_magic in /in/lLQoj on line 9 NULL Notice: Undefined index: epic_magic in /in/lLQoj on line 10 NULL Notice: Undefined variable: c in /in/lLQoj on line 11 NULL Notice: Undefined index: epic_magic in /in/lLQoj on line 14 NULL Notice: Undefined index: epic_magic in /in/lLQoj on line 15 NULL Notice: Undefined index: epic_magic in /in/lLQoj on line 18 NULL Notice: Undefined variable: aaa in /in/lLQoj on line 20 NULL Notice: Undefined variable: aaa in /in/lLQoj on line 21 Notice: Cannot access property on non-object in /in/lLQoj on line 21 NULL
Output for 5.4.0 - 5.4.7
Warning: Illegal offset type in /in/lLQoj on line 7 Notice: Undefined index: epic_magic in /in/lLQoj on line 9 array(1) { ["hurr"]=> string(4) "durr" } Notice: Undefined index: epic_magic in /in/lLQoj on line 10 array(1) { ["hurr"]=> string(4) "durr" } Notice: Undefined variable: c in /in/lLQoj on line 11 Notice: Undefined index: epic_magic in /in/lLQoj on line 11 array(1) { ["hurr"]=> string(4) "durr" } Notice: Undefined index: epic_magic in /in/lLQoj on line 14 array(0) { } Notice: Undefined index: epic_magic in /in/lLQoj on line 15 array(0) { } Notice: Undefined index: epic_magic in /in/lLQoj on line 18 string(6) "srsly?" Notice: Undefined variable: aaa in /in/lLQoj on line 20 string(6) "srsly?" Notice: Undefined variable: aaa in /in/lLQoj on line 21 Notice: Trying to get property of non-object in /in/lLQoj on line 21 NULL
Output for 5.3.18 - 5.3.29
Notice: Undefined index: epic_magic in /in/lLQoj on line 9 NULL Notice: Undefined index: epic_magic in /in/lLQoj on line 10 NULL Notice: Undefined variable: c in /in/lLQoj on line 11 NULL Notice: Undefined index: epic_magic in /in/lLQoj on line 14 NULL Notice: Undefined index: epic_magic in /in/lLQoj on line 15 NULL Notice: Undefined index: epic_magic in /in/lLQoj on line 18 NULL Notice: Undefined variable: aaa in /in/lLQoj on line 20 NULL Notice: Undefined variable: aaa in /in/lLQoj on line 21 Notice: Trying to get property of non-object in /in/lLQoj on line 21 NULL
Output for 5.3.0 - 5.3.17
Warning: Illegal offset type in /in/lLQoj on line 7 Notice: Undefined index: epic_magic in /in/lLQoj on line 9 array(1) { ["hurr"]=> string(4) "durr" } Notice: Undefined index: epic_magic in /in/lLQoj on line 10 array(1) { ["hurr"]=> string(4) "durr" } Notice: Undefined variable: c in /in/lLQoj on line 11 Notice: Undefined index: epic_magic in /in/lLQoj on line 11 array(1) { ["hurr"]=> string(4) "durr" } Notice: Undefined index: epic_magic in /in/lLQoj on line 14 array(0) { } Notice: Undefined index: epic_magic in /in/lLQoj on line 15 array(0) { } Notice: Undefined index: epic_magic in /in/lLQoj on line 18 string(6) "srsly?" Notice: Undefined variable: aaa in /in/lLQoj on line 20 string(6) "srsly?" Notice: Undefined variable: aaa in /in/lLQoj on line 21 Notice: Trying to get property of non-object in /in/lLQoj on line 21 string(6) "srsly?"
Output for 5.2.0 - 5.2.17
Warning: Illegal offset type in /in/lLQoj on line 7 Notice: Undefined index: epic_magic in /in/lLQoj on line 9 array(1) { ["hurr"]=> string(4) "durr" } Notice: Undefined index: epic_magic in /in/lLQoj on line 10 array(1) { ["hurr"]=> string(4) "durr" } Notice: Undefined variable: c in /in/lLQoj on line 11 Notice: Undefined index: epic_magic in /in/lLQoj on line 11 array(1) { ["hurr"]=> string(4) "durr" } Notice: Undefined index: epic_magic in /in/lLQoj on line 14 array(1) { ["hurr"]=> string(4) "durr" } Notice: Undefined index: epic_magic in /in/lLQoj on line 15 array(1) { ["hurr"]=> string(4) "durr" } Notice: Undefined index: epic_magic in /in/lLQoj on line 18 array(1) { ["hurr"]=> string(4) "durr" } Notice: Undefined variable: aaa in /in/lLQoj on line 20 NULL Notice: Undefined variable: aaa in /in/lLQoj on line 21 Notice: Trying to get property of non-object in /in/lLQoj on line 21 array(1) { ["hurr"]=> string(4) "durr" }
Output for 5.0.0 - 5.1.6
Warning: Illegal offset type in /in/lLQoj on line 7 Fatal error: Objects used as arrays in post/pre increment/decrement must return values by reference in /in/lLQoj on line 7
Process exited with code 255.
Output for 4.3.2 - 4.4.9
Fatal error: Cannot instantiate non-existent class: arrayobject in /in/lLQoj on line 3
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Cannot instantiate non-existent class: arrayobject in /in/lLQoj on line 3