mirror of
https://github.com/php/php-src.git
synced 2024-12-18 14:30:35 +08:00
21 lines
325 B
PHP
21 lines
325 B
PHP
--TEST--
|
|
Bug #63976 (Parent class incorrectly using child constant in class property)
|
|
--FILE--
|
|
<?php
|
|
if (1) {
|
|
class Foo {
|
|
const TABLE = "foo";
|
|
public $table = self::TABLE;
|
|
}
|
|
}
|
|
if (1) {
|
|
class Bar extends Foo {
|
|
const TABLE = "bar";
|
|
}
|
|
}
|
|
$bar = new Bar();
|
|
var_dump($bar->table);
|
|
?>
|
|
--EXPECT--
|
|
string(3) "foo"
|