3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class Foo { const THING = 'infoo'; public function get() { var_dump(self::THING); } } class Bar extends Foo { const THING = 'inbar'; } (new Bar)->get();
Output for 5.6.0 - 7.2.8
string(5) "infoo"