3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class A { const TEST = false; public function test() { var_dump($this, static::TEST, self::TEST); } } class B extends A { const TEST = true; public function test() { A::test(); parent::test(); } } $b = new B; $b->test();
based on 0kJiI
Output for 5.3.20 - 5.6.28, 7.0.1 - 7.2.0
object(B)#1 (0) { } bool(true) bool(false) object(B)#1 (0) { } bool(true) bool(false)
Output for 7.0.0
object(B)#1 (0) { } bool(false) bool(false) object(B)#1 (0) { } bool(true) bool(false)