Busybox: Upgrade to 1.21.1 (stable). lsof active.
[tomato.git] / release / src / router / php / ext / ereg / tests / eregi_replace_basic.phpt
blobf965c8f03a4dfc8a29fd991c4464dacca8d64568
1 --TEST--
2 Test eregi_replace() function : basic functionality - confirm case insensitivity
3 --FILE--
5 <?php
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
9  * Alias to functions: 
10  */
13  * Test basic functionality of eregi_replace()
14  */
16 echo "*** Testing eregi_replace() : basic functionality ***\n";
18 $string = 'UPPERCASE WORDS, lowercase words, MIxED CaSe woRdS';
20 echo "String Before...\n";
21 var_dump($string);
22 echo "\nString after...\n";
24 var_dump(eregi_replace('([[:lower:]]+) word', '\\1_character', $string));
26 echo "Done";
29 --EXPECTF--
30 *** Testing eregi_replace() : basic functionality ***
31 String Before...
32 string(50) "UPPERCASE WORDS, lowercase words, MIxED CaSe woRdS"
34 String after...
36 Deprecated: Function eregi_replace() is deprecated in %s on line %d
37 string(65) "UPPERCASE_characterS, lowercase_characters, MIxED CaSe_characterS"
38 Done