3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class Foo { const A = 2 << -1; const B = 2 << 0; } print_r(Foo::A); print_r(Foo::B);
Output for 7.1.6
Fatal error: Uncaught ArithmeticError: Bit shift by negative number in /in/kBQe9:10 Stack trace: #0 {main} thrown in /in/kBQe9 on line 10
Process exited with code 255.