3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function func($var) { $array = array(); $value = $array[$var]; $realVar = $var; if (substr($var, -1) == 'a') { } if (isset($value)) { $anotherValue = $var . 'a'; if ($value['a']) { } } } $one = new stdClass(); $items = new ArrayObject(array($one)); unset($items[0]); unset($items[0]->test); func('test');
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 - 5.6.28, 7.0.0 - 7.1.0
Notice: Indirect modification of overloaded element of ArrayObject has no effect in /in/8HWF0 on line 27 Notice: Undefined index: test in /in/8HWF0 on line 6
Output for hhvm-3.10.0 - 3.12.0
Notice: Undefined index: 0 in /in/8HWF0 on line 27 Notice: Undefined index: test in /in/8HWF0 on line 6
Output for 5.3.23 - 5.3.28, 5.4.13 - 5.4.29, 5.5.0 - 5.5.13
Notice: Undefined index: test in /in/8HWF0 on line 6
Output for 5.3.0 - 5.3.17, 5.4.0 - 5.4.7
Notice: Undefined offset: 0 in /in/8HWF0 on line 27 Notice: Indirect modification of overloaded element of ArrayObject has no effect in /in/8HWF0 on line 27 Notice: Undefined index: test in /in/8HWF0 on line 6
Output for 5.2.1 - 5.2.17
Notice: Undefined offset: 0 in /in/8HWF0 on line 27 Notice: Indirect modification of overloaded element of ArrayObject has no effect in /in/8HWF0 on line 27 Notice: Undefined index: test in /in/8HWF0 on line 6
Output for 5.0.0 - 5.2.0
Notice: Undefined offset: 0 in /in/8HWF0 on line 27 Notice: Undefined index: test in /in/8HWF0 on line 6
Output for 4.3.2 - 4.4.9
Fatal error: Cannot instantiate non-existent class: arrayobject in /in/8HWF0 on line 24
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Cannot instantiate non-existent class: arrayobject in /in/8HWF0 on line 24