xref: /php-src/Zend/tests/bug65911.phpt (revision 902d6439)
1--TEST--
2Bug #65911 (scope resolution operator - strange behavior with $this)
3--FILE--
4<?php
5class A {}
6
7class B
8{
9    public $foo;
10    public function go()
11    {
12        $this->foo = 'bar';
13        echo A::$this->foo; // should not output 'bar'
14    }
15}
16
17$obj = new B();
18$obj->go();
19?>
20--EXPECTF--
21Fatal error: Uncaught Error: Access to undeclared static property A::$this in %s:%d
22Stack trace:
23#0 %s(%d): B->go()
24#1 {main}
25  thrown in %s on line %d
26