bug24573.phpt 318 B

1234567891011121314151617181920212223
  1. --TEST--
  2. Bug #24573 (debug_backtrace() crashes if $this is set to null)
  3. --FILE--
  4. <?php
  5. class Foo {
  6. function Bar() {
  7. $__this = $this;
  8. $this = null;
  9. debug_backtrace();
  10. $this = $__this;
  11. }
  12. }
  13. $f = new Foo;
  14. $f->Bar();
  15. echo "OK\n";
  16. ?>
  17. --EXPECTF--
  18. Fatal error: Cannot re-assign $this in %s on line %d