1
0
mirror of https://github.com/php/php-src.git synced 2026-04-17 04:51:03 +02:00
Files
archived-php-src/ext/pcre/tests/bug21758.phpt
2015-03-31 17:55:27 +02:00

27 lines
471 B
PHP

--TEST--
Bug #21758 (preg_replace_callback() not working with class methods)
--FILE--
<?php
class Foo {
function __construct() {
$s = 'preg_replace() is broken';
var_dump(preg_replace_callback(
'/broken/',
array(&$this, 'bar'),
$s
));
}
function bar() {
return 'working';
}
} // of Foo
$o = new Foo;
?>
--EXPECT--
string(25) "preg_replace() is working"