3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php Class a { static const A = 'b'; } Class b extends a { public function a() { return static::A; } } var_dump((new b())->a());
based on G10oS
Output for 7.1.0 - 7.3.0rc3
Fatal error: Cannot use 'static' as constant modifier in /in/PhDYo on line 4
Process exited with code 255.
Output for 5.6.38 - 7.0.28
Parse error: syntax error, unexpected 'const' (T_CONST), expecting variable (T_VARIABLE) in /in/PhDYo on line 4
Process exited with code 255.