3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $currentproduct = "Protein Shaker"; $groupID = array("Vest", "Snapback", "Sock", "Cap", "Top", "Tee", "T-Shirt"); if (strpos($groupID, $currentproduct)) { $_customGroupID = "68"; } else { $_customGroupID = "89"; } echo "group id is " . $_customGroupID; ?>
Output for 5.3.0 - 5.6.28, hhvm-3.10.0 - 3.13.2, 7.0.0 - 7.1.0
Warning: strpos() expects parameter 1 to be string, array given in /in/DjUgr on line 4 group id is 89
Output for 4.3.0 - 5.2.17
Notice: Array to string conversion in /in/DjUgr on line 4 group id is 89