mirror of
https://github.com/php/php-src.git
synced 2024-12-12 11:23:53 +08:00
27 lines
374 B
PHP
27 lines
374 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)
|