TypePHP 编译器
https://swoole.com/aot/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
521 B
36 lines
521 B
--TEST--
|
|
Assign by reference to parent static property (parent::$value)
|
|
--FILE--
|
|
<?php
|
|
|
|
class Base
|
|
{
|
|
public static $value = 1;
|
|
}
|
|
|
|
class Child extends Base
|
|
{
|
|
public static function run()
|
|
{
|
|
$ref = &parent::$value;
|
|
var_dump(parent::$value);
|
|
var_dump(Child::$value);
|
|
$ref = 999;
|
|
var_dump(parent::$value);
|
|
var_dump(Child::$value);
|
|
var_dump(Base::$value);
|
|
}
|
|
}
|
|
|
|
function main()
|
|
{
|
|
Child::run();
|
|
}
|
|
|
|
?>
|
|
--EXPECT--
|
|
int(1)
|
|
int(1)
|
|
int(999)
|
|
int(999)
|
|
int(999)
|
|
|