3v4l.org

run code in 200+ php & hhvm versions
<?php $var = ''; $var[] = 'make me an array';
based on Kv2cp
Output for 7.1.0 - 7.3.0
Fatal error: Uncaught Error: [] operator not supported for strings in /in/SPBA6:5 Stack trace: #0 {main} thrown in /in/SPBA6 on line 5
Process exited with code 255.
Output for 4.3.0 - 5.6.38, hhvm-3.10.1 - 3.22.0, 7.0.0 - 7.0.33