3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class Foo { const A = 1 << 0; const C = 1 << 1; const B = self::A | self::C; } class Bar extends Foo { const A = 1 << 2; const C = 1 << 3; } var_dump(decbin(Bar::B));
based on vUHq3
Output for hhvm-3.12.14 - 3.17.3, 7.0.0 - 7.3.1
string(2) "11"
Output for 5.6.0 - 5.6.30
string(4) "1100"