bug23922.phpt 422 B

123456789101112131415161718192021
  1. --TEST--
  2. Bug #23922 (scope doesn't properly propagate into internal functions)
  3. --FILE--
  4. <?php
  5. class foo
  6. {
  7. public $foo = 1;
  8. function as_string()
  9. { assert('$this->foo == 1'); }
  10. function as_expr()
  11. { assert($this->foo == 1); }
  12. }
  13. $foo = new foo();
  14. $foo->as_expr();
  15. $foo->as_string();
  16. ?>
  17. --EXPECTF--
  18. Deprecated: assert(): Calling assert() with a string argument is deprecated in %s on line %d