mirror of
https://github.com/php/php-src.git
synced 2024-12-15 21:05:51 +08:00
34 lines
464 B
Plaintext
34 lines
464 B
Plaintext
|
--TEST--
|
||
|
Bug #46308 (Invalid write when changing property from inside getter)
|
||
|
--FILE--
|
||
|
<?php
|
||
|
class main
|
||
|
{
|
||
|
public static $dummy = NULL ;
|
||
|
public static $dataAccessor = NULL ;
|
||
|
}
|
||
|
|
||
|
class dataAccessor
|
||
|
{
|
||
|
}
|
||
|
|
||
|
class relay
|
||
|
{
|
||
|
public function __get( $name )
|
||
|
{
|
||
|
main::$dataAccessor = new dataAccessor;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
class dummy
|
||
|
{
|
||
|
}
|
||
|
|
||
|
main::$dummy = new dummy();
|
||
|
main::$dataAccessor = new relay();
|
||
|
main::$dataAccessor->bar;
|
||
|
echo "ok\n";
|
||
|
?>
|
||
|
--EXPECT--
|
||
|
ok
|