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 - 5.6.38, hhvm-3.10.1, hhvm-3.20.2 - 3.21.3, 7.0.0 - 7.2.12
Notice: Undefined variable: matier in /in/EW7H8 on line 9 Notice: Undefined variable: matier in /in/EW7H8 on line 9 Matiere1 : - Matiere2 :
Output for hhvm-3.22.0
Notice: Undefined variable: matier in /in/EW7H8 on line -1 Notice: Undefined variable: matier in /in/EW7H8 on line -1 Matiere1 : - Matiere2 :
Output for hhvm-3.11.1 - 3.19.2
Notice: Undefined variable: matier in /in/EW7H8 on line 9 Warning: strtolower() expects parameter 1 to be string, null given in /in/EW7H8 on line 9 Warning: strpos() expects parameter 1 to be string, null given in /in/EW7H8 on line 11 Notice: Undefined variable: matier in /in/EW7H8 on line 9 Warning: strtolower() expects parameter 1 to be string, null given in /in/EW7H8 on line 9 Warning: strpos() expects parameter 1 to be string, null given in /in/EW7H8 on line 11 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 :