3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php switch ($i) { case 1: $db = 'post_data'; break; case 1: $db = 'post_comment'; break; case 2: $db = 'post_img'; break; }
Output for 5.1.0 - 7.2.0
Notice: Undefined variable: i in /in/UuP9Q on line 3 Notice: Undefined variable: i in /in/UuP9Q on line 6 Notice: Undefined variable: i in /in/UuP9Q on line 9
Output for 5.0.4 - 5.0.5
Notice: Undefined variable: i in /in/UuP9Q on line 2
Output for 4.3.0 - 5.0.3
Notice: Undefined variable: i in /in/UuP9Q on line 2