php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | |
Patch bug53823.phpt for PCRE related Bug #53823Patch version 2012-02-25 09:53 UTC Return to Bug #53823 | Download this patchThis patch renders other patches obsolete Obsolete patches: Patch Revisions:Developer: robertbasic.com@gmail.com--TEST-- Bug #53823 (preg_replace: * qualifier on unicode replace garbles the string) --FILE-- <?php function prc_callback($matches) { return ''; } var_dump(preg_replace('/[^\pL\pM]*/iu', '', 'áéíóú')); var_dump(preg_replace('/[^\pL\pM]+/iu', '', 'áéíóú')); var_dump(preg_filter('/[^\pL\pM]*/iu', '', 'áéíóú')); var_dump(preg_filter('/[^\pL\pM]+/iu', '', 'áéíóú')); var_dump(preg_replace_callback('/[^\pL\pM]*/iu', "prc_callback", 'áéíóú')); var_dump(preg_replace_callback('/[^\pL\pM]+/iu', "prc_callback", 'áéíóú')); ?> --EXPECT-- string(10) "áéíóú" string(10) "áéíóú" string(10) "áéíóú" NULL string(10) "áéíóú" string(10) "áéíóú" |
Copyright © 2001-2025 The PHP Group All rights reserved. |
Last updated: Thu Jan 02 13:01:30 2025 UTC |