3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $string="M"; $last=array($strig,$strg,$string,$stg); switch($last) { case 'k': case 'K': echo "k"; break; case 'm': case 'M': echo "k"; break; default: echo "o"; } ?>
Output for 5.0.4 - 7.1.0
Notice: Undefined variable: strig in /in/sDWjG on line 3 Notice: Undefined variable: strg in /in/sDWjG on line 3 Notice: Undefined variable: stg in /in/sDWjG on line 3 o
Output for 4.3.0 - 5.0.3
Notice: Undefined variable: strig in /in/sDWjG on line 3 Notice: Undefined variable: strg in /in/sDWjG on line 3 Notice: Undefined variable: stg in /in/sDWjG on line 3 o