<?php class Foo { const A = 1; public function bar() { return function() { var_dump(static::A, self::A); }; } } class Herp extends Foo { const A=2; } $f = (new Herp())->bar(); $f();
You have javascript disabled. You will not be able to edit any code.