3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function depbuild($location, $suffix, $locale) { var_dump(array( implode('-', array_filter(array($name, $location, $suffix, $locale))), $name, )); } $name = 'foo'; $location = array(null, 'GL', 'AS'); $suffix = array(null, 'P','C'); $locale = array(null, 'fr_FR'); foreach($location as $loc) { foreach($suffix as $s) { foreach($locale as $l) { depbuild($name, $loc, $s, $l); } } }
Output for 5.0.4 - 7.1.0
Notice: Undefined variable: name in /in/5pmVu on line 5 Notice: Undefined variable: name in /in/5pmVu on line 6 array(2) { [0]=> string(3) "foo" [1]=> NULL } Notice: Undefined variable: name in /in/5pmVu on line 5 Notice: Undefined variable: name in /in/5pmVu on line 6 array(2) { [0]=> string(3) "foo" [1]=> NULL } Notice: Undefined variable: name in /in/5pmVu on line 5 Notice: Undefined variable: name in /in/5pmVu on line 6 array(2) { [0]=> string(5) "foo-P" [1]=> NULL } Notice: Undefined variable: name in /in/5pmVu on line 5 Notice: Undefined variable: name in /in/5pmVu on line 6 array(2) { [0]=> string(5) "foo-P" [1]=> NULL } Notice: Undefined variable: name in /in/5pmVu on line 5 Notice: Undefined variable: name in /in/5pmVu on line 6 array(2) { [0]=> string(5) "foo-C" [1]=> NULL } Notice: Undefined variable: name in /in/5pmVu on line 5 Notice: Undefined variable: name in /in/5pmVu on line 6 array(2) { [0]=> string(5) "foo-C" [1]=> NULL } Notice: Undefined variable: name in /in/5pmVu on line 5 Notice: Undefined variable: name in /in/5pmVu on line 6 array(2) { [0]=> string(6) "foo-GL" [1]=> NULL } Notice: Undefined variable: name in /in/5pmVu on line 5 Notice: Undefined variable: name in /in/5pmVu on line 6 array(2) { [0]=> string(6) "foo-GL" [1]=> NULL } Notice: Undefined variable: name in /in/5pmVu on line 5 Notice: Undefined variable: name in /in/5pmVu on line 6 array(2) { [0]=> string(8) "foo-GL-P" [1]=> NULL } Notice: Undefined variable: name in /in/5pmVu on line 5 Notice: Undefined variable: name in /in/5pmVu on line 6 array(2) { [0]=> string(8) "foo-GL-P" [1]=> NULL } Notice: Undefined variable: name in /in/5pmVu on line 5 Notice: Undefined variable: name in /in/5pmVu on line 6 array(2) { [0]=> string(8) "foo-GL-C" [1]=> NULL } Notice: Undefined variable: name in /in/5pmVu on line 5 Notice: Undefined variable: name in /in/5pmVu on line 6 array(2) { [0]=> string(8) "foo-GL-C" [1]=> NULL } Notice: Undefined variable: name in /in/5pmVu on line 5 Notice: Undefined variable: name in /in/5pmVu on line 6 array(2) { [0]=> string(6) "foo-AS" [1]=> NULL } Notice: Undefined variable: name in /in/5pmVu on line 5 Notice: Undefined variable: name in /in/5pmVu on line 6 array(2) { [0]=> string(6) "foo-AS" [1]=> NULL } Notice: Undefined variable: name in /in/5pmVu on line 5 Notice: Undefined variable: name in /in/5pmVu on line 6 array(2) { [0]=> string(8) "foo-AS-P" [1]=> NULL } Notice: Undefined variable: name in /in/5pmVu on line 5 Notice: Undefined variable: name in /in/5pmVu on line 6 array(2) { [0]=> string(8) "foo-AS-P" [1]=> NULL } Notice: Undefined variable: name in /in/5pmVu on line 5 Notice: Undefined variable: name in /in/5pmVu on line 6 array(2) { [0]=> string(8) "foo-AS-C" [1]=> NULL } Notice: Undefined variable: name in /in/5pmVu on line 5 Notice: Undefined variable: name in /in/5pmVu on line 6 array(2) { [0]=> string(8) "foo-AS-C" [1]=> NULL }
Output for 4.3.0 - 5.0.3
Notice: Undefined variable: name in /in/5pmVu on line 5 Notice: Undefined variable: name in /in/5pmVu on line 6 array(2) { [0]=> string(3) "foo" [1]=> NULL } Notice: Undefined variable: name in /in/5pmVu on line 5 Notice: Undefined variable: name in /in/5pmVu on line 6 array(2) { [0]=> string(3) "foo" [1]=> NULL } Notice: Undefined variable: name in /in/5pmVu on line 5 Notice: Undefined variable: name in /in/5pmVu on line 6 array(2) { [0]=> string(5) "foo-P" [1]=> NULL } Notice: Undefined variable: name in /in/5pmVu on line 5 Notice: Undefined variable: name in /in/5pmVu on line 6 array(2) { [0]=> string(5) "foo-P" [1]=> NULL } Notice: Undefined variable: name in /in/5pmVu on line 5 Notice: Undefined variable: name in /in/5pmVu on line 6 array(2) { [0]=> string(5) "foo-C" [1]=> NULL } Notice: Undefined variable: name in /in/5pmVu on line 5 Notice: Undefined variable: name in /in/5pmVu on line 6 array(2) { [0]=> string(5) "foo-C" [1]=> NULL } Notice: Undefined variable: name in /in/5pmVu on line 5 Notice: Undefined variable: name in /in/5pmVu on line 6 array(2) { [0]=> string(6) "foo-GL" [1]=> NULL } Notice: Undefined variable: name in /in/5pmVu on line 5 Notice: Undefined variable: name in /in/5pmVu on line 6 array(2) { [0]=> string(6) "foo-GL" [1]=> NULL } Notice: Undefined variable: name in /in/5pmVu on line 5 Notice: Undefined variable: name in /in/5pmVu on line 6 array(2) { [0]=> string(8) "foo-GL-P" [1]=> NULL } Notice: Undefined variable: name in /in/5pmVu on line 5 Notice: Undefined variable: name in /in/5pmVu on line 6 array(2) { [0]=> string(8) "foo-GL-P" [1]=> NULL } Notice: Undefined variable: name in /in/5pmVu on line 5 Notice: Undefined variable: name in /in/5pmVu on line 6 array(2) { [0]=> string(8) "foo-GL-C" [1]=> NULL } Notice: Undefined variable: name in /in/5pmVu on line 5 Notice: Undefined variable: name in /in/5pmVu on line 6 array(2) { [0]=> string(8) "foo-GL-C" [1]=> NULL } Notice: Undefined variable: name in /in/5pmVu on line 5 Notice: Undefined variable: name in /in/5pmVu on line 6 array(2) { [0]=> string(6) "foo-AS" [1]=> NULL } Notice: Undefined variable: name in /in/5pmVu on line 5 Notice: Undefined variable: name in /in/5pmVu on line 6 array(2) { [0]=> string(6) "foo-AS" [1]=> NULL } Notice: Undefined variable: name in /in/5pmVu on line 5 Notice: Undefined variable: name in /in/5pmVu on line 6 array(2) { [0]=> string(8) "foo-AS-P" [1]=> NULL } Notice: Undefined variable: name in /in/5pmVu on line 5 Notice: Undefined variable: name in /in/5pmVu on line 6 array(2) { [0]=> string(8) "foo-AS-P" [1]=> NULL } Notice: Undefined variable: name in /in/5pmVu on line 5 Notice: Undefined variable: name in /in/5pmVu on line 6 array(2) { [0]=> string(8) "foo-AS-C" [1]=> NULL } Notice: Undefined variable: name in /in/5pmVu on line 5 Notice: Undefined variable: name in /in/5pmVu on line 6 array(2) { [0]=> string(8) "foo-AS-C" [1]=> NULL }