mirror of
https://github.com/php/php-src.git
synced 2024-12-19 15:00:15 +08:00
27 lines
366 B
PHP
27 lines
366 B
PHP
--TEST--
|
|
Bug #70997 (When using parentClass:: instead of parent::, static context changed)
|
|
--FILE--
|
|
<?php
|
|
class A {
|
|
const TEST = false;
|
|
|
|
public function test()
|
|
{
|
|
var_dump(static::TEST);
|
|
}
|
|
}
|
|
|
|
class B extends A {
|
|
const TEST = true;
|
|
|
|
public function test()
|
|
{
|
|
A::test();
|
|
}
|
|
}
|
|
|
|
$b = new B;
|
|
$b->test();
|
|
--EXPECT--
|
|
bool(true)
|