diff options
author | SVN Migration <svn@php.net> | 2006-10-15 21:09:28 +0000 |
---|---|---|
committer | SVN Migration <svn@php.net> | 2006-10-15 21:09:28 +0000 |
commit | 88ec761548b66f58acc1a86cdd0fc164ca925476 (patch) | |
tree | d0af978fa00d83bb1d82c613f66477fbd6bb18aa /ext/pcre/tests/preg_replace_callback2.phpt | |
parent | 268984b4787e797db6054313fc9ba3b9e845306e (diff) | |
download | php-git-PECL_OPENSSL.tar.gz |
This commit was manufactured by cvs2svn to create branch 'PECL_OPENSSL'.PECL_OPENSSL
Diffstat (limited to 'ext/pcre/tests/preg_replace_callback2.phpt')
-rw-r--r-- | ext/pcre/tests/preg_replace_callback2.phpt | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/ext/pcre/tests/preg_replace_callback2.phpt b/ext/pcre/tests/preg_replace_callback2.phpt deleted file mode 100644 index a7f5a362dc..0000000000 --- a/ext/pcre/tests/preg_replace_callback2.phpt +++ /dev/null @@ -1,40 +0,0 @@ ---TEST-- -preg_replace_callback() 2 ---FILE-- -<?php - -function f() { - throw new Exception(); -} - -try { -var_dump(preg_replace_callback('/\w/', 'f', 'z')); -} catch(Exception $e) {} - -function g($x) { - return "'$x[0]'"; -} - -var_dump(preg_replace_callback('@\b\w{1,2}\b@', 'g', array('a b3 bcd', 'v' => 'aksfjk', 12 => 'aa bb'))); - -var_dump(preg_replace_callback('~\A.~', 'g', array(array('xyz')))); - -var_dump(preg_replace_callback('~\A.~', create_function('$m', 'return strtolower($m[0]);'), 'ABC')); -?> ---EXPECTF-- -Warning: preg_replace_callback(): Unable to call custom replacement function in %spreg_replace_callback2.php on line %d -array(3) { - [0]=> - string(12) "'a' 'b3' bcd" - ["v"]=> - string(6) "aksfjk" - [12]=> - string(9) "'aa' 'bb'" -} - -Notice: Array to string conversion in %spreg_replace_callback2.php on line 17 -array(1) { - [0]=> - string(7) "'A'rray" -} -string(3) "aBC" |