Annotation of embedaddon/php/ext/pcre/tests/bug21758.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: Bug #21758 (preg_replace_callback() not working with class methods)
3: --FILE--
4: <?php
5: class Foo {
6: function foo() {
7:
8: $s = 'preg_replace() is broken';
9:
10: var_dump(preg_replace_callback(
11: '/broken/',
12: array(&$this, 'bar'),
13: $s
14: ));
15: }
16:
17: function bar() {
18: return 'working';
19: }
20:
21: } // of Foo
22:
23: $o = new Foo;
24: ?>
25: --EXPECT--
26: string(25) "preg_replace() is working"
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>