3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?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; } }
Output for 5.0.4 - 7.2.0
Notice: Undefined variable: matier in /in/EW7H8 on line 9 Notice: Undefined variable: matier in /in/EW7H8 on line 9 Matiere1 : - Matiere2 :
Output for 4.3.0 - 5.0.3
Notice: Undefined variable: matier in /in/EW7H8 on line 9 Notice: Undefined variable: matier in /in/EW7H8 on line 9 Matiere1 : - Matiere2 :