bug24403.phpt 443 B

123456789101112131415161718192021
  1. --TEST--
  2. Bug #24403 (scope doesn't properly propagate into internal functions)
  3. --FILE--
  4. <?php
  5. class a
  6. {
  7. public $a = array();
  8. function a()
  9. {
  10. $output = preg_replace(
  11. '!\{\s*([a-z0-9_]+)\s*\}!sie',
  12. "(in_array('\\1',\$this->a) ? '\'.\$p[\'\\1\'].\'' :
  13. '\'.\$r[\'\\1\'].\'')",
  14. "{a} b {c}");
  15. }
  16. }
  17. new a();
  18. ?>
  19. --EXPECTF--
  20. Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in %s on line %d