bug65911.phpt 337 B

1234567891011121314151617181920
  1. --TEST--
  2. Bug #65911 (scope resolution operator - strange behavior with $this)
  3. --FILE--
  4. <?php
  5. class A {}
  6. class B
  7. {
  8. public function go()
  9. {
  10. $this->foo = 'bar';
  11. echo A::$this->foo; // should not output 'bar'
  12. }
  13. }
  14. $obj = new B();
  15. $obj->go();
  16. ?>
  17. --EXPECTF--
  18. Fatal error: Access to undeclared static property: A::$this in %s on line %d