3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $eligible_categories = array("mens:apparel"); $list_categories = array("mens:apparel:shirts", "mens:footwear"); $test1 = explode(":",$eligible_categories); $test2 = explode(":", $list_categories); print_r($test1); print_r($tes2);
Output for 5.3.1 - 7.2.0
Warning: explode() expects parameter 2 to be string, array given in /in/Qj807 on line 5 Warning: explode() expects parameter 2 to be string, array given in /in/Qj807 on line 6 Notice: Undefined variable: tes2 in /in/Qj807 on line 8
Output for 5.0.4 - 5.3.0
Notice: Array to string conversion in /in/Qj807 on line 5 Notice: Array to string conversion in /in/Qj807 on line 6 Array ( [0] => Array ) Notice: Undefined variable: tes2 in /in/Qj807 on line 8
Output for 4.3.0 - 5.0.3
Notice: Array to string conversion in /in/Qj807 on line 5 Notice: Array to string conversion in /in/Qj807 on line 6 Array ( [0] => Array ) Notice: Undefined variable: tes2 in /in/Qj807 on line 8