3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $catalogName = 'bzp'; $mktList = "ama,pmi,cdi,fna"; $mktList_arr = explode(",",$mktList); var_export($mktList_arr); foreach($mktList_arr as $a){ $$a = $catalogName; echo "$catalogName$a"."__products\n"; } ?>
Output for 4.3.0 - 7.1.0
array ( 0 => 'ama', 1 => 'pmi', 2 => 'cdi', 3 => 'fna', )bzpama__products bzppmi__products bzpcdi__products bzpfna__products