3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $x = array("condition" => "test"); if ($x['condition']['test']) { echo "test"; } echo '\n\r'; print_r($x); echo $x['test'];
Output for 5.4.18 - 7.1.0
Warning: Illegal string offset 'test' in /in/N9OXY on line 4 test\n\rArray ( [condition] => test ) Notice: Undefined index: test in /in/N9OXY on line 11
Output for 5.4.0 - 5.4.17
Warning: Illegal string offset 'test' in /in/u3jTK on line 4 test\n\rArray ( [condition] => test ) Notice: Undefined index: test in /in/u3jTK on line 11
Output for 5.3.28 - 5.3.29
test\n\rArray ( [condition] => test ) Notice: Undefined index: test in /in/N9OXY on line 11
Output for 5.3.0 - 5.3.27
test\n\rArray ( [condition] => test ) Notice: Undefined index: test in /in/u3jTK on line 11
Output for 4.3.1 - 5.2.17
test\n\rArray ( [condition] => test ) Notice: Undefined index: test in /in/u3jTK on line 11
Output for 4.3.0
test\n\rArray ( [condition] => test ) Notice: Undefined index: test in /in/N9OXY on line 11