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($tes2);
Output for 5.3.1 - 5.6.28, hhvm-3.12.0 - 3.13.2, 7.0.0 - 7.1.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 hhvm-3.10.0
Warning: explode() expects parameter 2 to be string, array given in /in/Qj807 on line -1 Warning: explode() expects parameter 2 to be string, array given in /in/Qj807 on line -1 Notice: Undefined variable: tes2 in /in/Qj807 on line -1
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