3v4l.org

run code in 300+ PHP versions simultaneously
<?php $matiere1 = 'Cotton 2'; $matiere2 = 'lol'; echo "Matiere1 : ".checkMatiere($matiere1)." - Matiere2 : ".checkMatiere($matiere2); function checkMatiere($matiere){ $matiere = strtolower($matier); switch ($matiere) { case (strpos($matiere, 'cotton') !== FALSE): $matiere = 'coton'; break; default: $matiere = "KO"; break; } }

preferences:
44.21 ms | 402 KiB | 5 Q