3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function testWrapper() { foreach (array( 'testvar1', 'testvar2' ) AS $varname) { if (!isset($$varname)) { echo "\nSetting $varname\n"; $$varname = array(); } var_dump($$varname); } } testWrapper();
Output for 4.3.0 - 7.1.0
Setting testvar1 array(0) { } Setting testvar2 array(0) { }