3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $a = 'foo bar baz'; $b = 'a'; var_dump( $$b[0] ); ${$b}[0] = ''; var_dump( $$b[0] );
Output for 7.1.0
string(1) "f" Warning: Cannot assign an empty string to a string offset in /in/XhWnm on line 5 string(1) "f"
Output for 7.0.0 - 7.0.14
string(1) "f" string(1) ""
Output for 4.3.0 - 5.6.28
string(11) "foo bar baz" string(11) "oo bar baz"