summaryrefslogtreecommitdiff
path: root/Zend/tests/bug65911.phpt
blob: 753c8c6c7d813877f4889f5615a862dd077de714 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
--TEST--
Bug #65911 (scope resolution operator - strange behavior with $this)
--FILE--
<?php
class A {}

class B
{
	public function go()
	{
		$this->foo = 'bar';
		echo A::$this->foo; // should not output 'bar'
	}
}

$obj = new B();
$obj->go();
?>
--EXPECTF--
Fatal error: Uncaught Error: Access to undeclared static property: A::$this in %s:%d
Stack trace:
#0 %s(%d): B->go()
#1 {main}
  thrown in %s on line %d