3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php var_dump(f(),f2()); function f(){ switch(1){ case 'ramen': return 'ramen'; case 'a': return 'string("1")'; case 1: return 'int(1)'; default: return 'default'; }} function f2(){ $v=1; switch($v){ case 'ramen': return 'ramen'; case 'a': return 'string("1")'; case 1: return 'int(1)'; default: return 'default'; }}
Output for 4.3.0 - 7.1.0
string(6) "int(1)" string(6) "int(1)"