3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $arraylist = array("/abc/"=>"myfunction"); function myfunction(){ echo "Whatnow"; } foreach($arraylist as $key=>$value){ if(preg_match($key, "abc")){ $func = $value; $func(); } }
based on DvQgF
Output for 4.3.0 - 7.1.0
Whatnow