3v4l.org

run code in 150+ 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($test2);
Output for 5.3.1 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
Warning: explode() expects parameter 2 to be string, array given in /in/K89rj on line 5 Warning: explode() expects parameter 2 to be string, array given in /in/K89rj on line 6
Output for 4.3.0 - 5.3.0
Notice: Array to string conversion in /in/K89rj on line 5 Notice: Array to string conversion in /in/K89rj on line 6 Array ( [0] => Array ) Array ( [0] => Array )