3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $mktList = "ama,pmi,cdi,fna"; $mktList_arr = explode(",",$mktList); var_export($mktList_arr); foreach($mktList_arr as $a){ $$a = 'bzp'; echo "$cdi$a"."__products"; } ?>
Output for 5.0.4 - 5.6.28, hhvm-3.10.0 - 3.13.2, 7.0.0 - 7.1.0
array ( 0 => 'ama', 1 => 'pmi', 2 => 'cdi', 3 => 'fna', ) Notice: Undefined variable: cdi in /in/6rIMh on line 9 ama__products Notice: Undefined variable: cdi in /in/6rIMh on line 9 pmi__productsbzpcdi__productsbzpfna__products
Output for 4.3.0 - 5.0.3
array ( 0 => 'ama', 1 => 'pmi', 2 => 'cdi', 3 => 'fna', ) Notice: Undefined variable: cdi in /in/6rIMh on line 9 ama__products Notice: Undefined variable: cdi in /in/6rIMh on line 9 pmi__productsbzpcdi__productsbzpfna__products