2 Test eregi_replace() function : basic functionality - confirm case insensitivity
6 /* Prototype : proto string eregi_replace(string pattern, string replacement, string string)
7 * Description: Case insensitive replace regular expression
8 * Source code: ext/standard/reg.c
13 * Test basic functionality of eregi_replace()
16 echo "*** Testing eregi_replace() : basic functionality ***\n";
18 $string = 'UPPERCASE WORDS, lowercase words, MIxED CaSe woRdS';
20 echo "String Before...\n";
22 echo "\nString after...\n";
24 var_dump(eregi_replace('([[:lower:]]+) word', '\\1_character', $string));
30 *** Testing eregi_replace() : basic functionality ***
32 string(50) "UPPERCASE WORDS, lowercase words, MIxED CaSe woRdS"
36 Deprecated: Function eregi_replace() is deprecated in %s on line %d
37 string(65) "UPPERCASE_characterS, lowercase_characters, MIxED CaSe_characterS"