3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $x = array("condition" => "test"); if ($x['condition']['test']) { echo "test"; } echo '\n'; print_r($x); echo $x['condition'];
Output for 5.4.18 - 5.6.28, 7.0.0 - 7.1.0
Warning: Illegal string offset 'test' in /in/7P4M4 on line 4 test\nArray ( [condition] => test ) test
Output for 4.3.0 - 5.3.29, hhvm-3.10.0 - 3.12.0
test\nArray ( [condition] => test ) test
Output for 5.4.0 - 5.4.17
Warning: Illegal string offset 'test' in /in/bYYgv on line 4 test\nArray ( [condition] => test ) test