3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php declare(strict_types=1); $foo = 1; switch($foo) { case true: print "foo is true (foo=$foo)"; break; case 1: print "foo is 1; (foo=$foo)"; break; }
based on ugGQk
Output for 4.3.0 - 5.2.17, hhvm-3.10.1 - 3.22.0, 7.0.0 - 7.2.11
foo is true (foo=1)
Output for 5.3.0 - 5.6.38
Warning: Unsupported declare 'strict_types' in /in/AUNE8 on line 1 foo is true (foo=1)