3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $x = ""; $x['foo'] = 'bar'; echo $x ?>
based on CZ4BT
Output for 7.1.0 - 7.3.0
Warning: Illegal string offset 'foo' in /in/grbcp on line 3 b
Output for 7.0.0 - 7.0.33
Notice: Array to string conversion in /in/grbcp on line 4 Array
Output for 5.6.0 - 5.6.38, hhvm-3.15.4 - 3.17.3
Notice: Array to string conversion in /in/grbcp on line 5 Array
Output for hhvm-3.12.14

Process exited with code 137.