3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $productName = "Bad Boy V Bar"; // Clothing if (strpos($productName,"Vest") !== false) { echo "vest"; } elseif (strpos($productName, "tee") !== false) { echo "tee"; } elseif (strpos($productName, "t-shirt") !== false) { echo "t-shirt"; } elseif (strpos($productName, "top") !== false) { echo "top"; } elseif (strpos($productName, "cap") !== false) { echo "cap"; } elseif (strpos($productName, "socks") !== false) { echo "socks"; } elseif (strpos($productName, "jogger") !== false) { echo "jogger"; } elseif (strpos($productName, "hoodie") !== false) { echo "hoodie"; } elseif (strpos($productName, "hoodie") !== false) { echo "hoodie"; } // Equipment elseif (strpos($productName, "weighted vest") !== false) { echo "weighted vest"; } elseif (strpos($productName, "barbell") !== false) { echo "barbell"; } elseif (strpos($productName, "kettlebell") !== false) { echo "kettlebell"; } elseif (strpos($productName, "curl bar") !== false) { echo "curl bar"; } elseif (strpos($productName, "rope") !== false) { echo "rope"; } elseif (strpos($productName, "purpose bar") !== false) { echo "purpose bar"; } elseif (strpos($productName, "weight plate") !== false) { echo "weight plate"; } elseif (strpos($productName, "olympic bar") !== false) { echo "olympic bar"; } elseif (strpos($productName, "cable") !== false) { echo "cable attachments"; } elseif (strpos($productName, "lat bar") !== false) { echo "lat bar"; } elseif (strpos($productName, "dumpbell") !== false) { echo "dumpbell"; } elseif (strpos($productName, "v bar") !== false) { echo "v bar"; } elseif (strpos($productName, "dumpbell") !== false) { echo "dumpbell"; } elseif (strpos($productName, "grip disc") !== false) { echo "grip disc"; } elseif (strpos($productName, "grip weight") !== false) { echo "grip weight"; } elseif (strpos($productName, "cable handle") !== false) { echo "cable handle"; } ?>
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0