php-src/Zend/tests/bug70997.phpt

28 lines
369 B
Plaintext
Raw Normal View History

--TEST--
Bug #70997 (When using parentClass:: instead of parent::, static context changed)
--FILE--
<?php
class A {
const TEST = false;
2018-09-17 01:16:42 +08:00
public function test()
{
var_dump(static::TEST);
}
}
class B extends A {
const TEST = true;
2018-09-17 01:16:42 +08:00
public function test()
{
A::test();
}
}
$b = new B;
$b->test();
?>
--EXPECT--
bool(true)