3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class Image { const CROP_ENTROPY = 'Entropy'; const CROP_BALANCED = 'Balanced'; const CROP_FACE = 'Face'; } $x = 0; switch ($x) { case Image::CROP_BALANCED: case Image::CROP_ENTROPY: case Image::CROP_FACE: echo 'Hello from switch!' . "\n"; } echo '$x is ' . $x;
Output for 5.6.0 - 7.1.7
Hello from switch! $x is 0