errmsg_003.phpt 261 B

12345678910111213141516171819
  1. --TEST--
  2. errmsg: cannot reassign $this (by ref)
  3. --FILE--
  4. <?php
  5. class test {
  6. function foo() {
  7. $a = new test;
  8. $this = &$a;
  9. }
  10. }
  11. $t = new test;
  12. $t->foo();
  13. echo "Done\n";
  14. ?>
  15. --EXPECTF--
  16. Fatal error: Cannot re-assign $this in %s on line %d