php-src/Zend/tests/bug65911.phpt
bwoebi 4c0bb6d76e Fixed bug #65911 ($this not usable as static property)
In context of static accesses like classname::$this, the string
"$this" should not be handled like a $this variable, but as an
identifier for a static variable.
2013-10-16 18:33:14 +02:00

21 lines
337 B
PHP

--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: Access to undeclared static property: A::$this in %s on line %d