xref: /PHP-7.2/Zend/tests/bug46308.phpt (revision 41ad9b4d)
1--TEST--
2Bug #46308 (Invalid write when changing property from inside getter)
3--FILE--
4<?php
5class main
6{
7   public static $dummy        = NULL ;
8   public static $dataAccessor = NULL ;
9}
10
11class dataAccessor
12{
13}
14
15class relay
16{
17   public function __get( $name )
18   {
19       main::$dataAccessor = new dataAccessor;
20   }
21}
22
23class dummy
24{
25}
26
27main::$dummy        = new dummy();
28main::$dataAccessor = new relay();
29main::$dataAccessor->bar;
30echo "ok\n";
31?>
32--EXPECT--
33ok
34