3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class A { protected final const BLOP = 1; public function get() { return static::BLOP; } public function get2() { return self::BLOP; } } class B extends A { protected const BLOP = 2; } $o = new B(); var_dump($o->get(), $o->get2());
based on XCCbo
Output for 5.5.0 - 7.0.7
Parse error: syntax error, unexpected 'const' (T_CONST), expecting variable (T_VARIABLE) in /in/dt9oc on line 5
Process exited with code 255.