1--TEST--
2Test eregi_replace() function : basic functionality - confirm case insensitivity
3--FILE--
4
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 */
11
12/*
13 * Test basic functionality of eregi_replace()
14 */
15
16echo "*** Testing eregi_replace() : basic functionality ***\n";
17
18$string = 'UPPERCASE WORDS, lowercase words, MIxED CaSe woRdS';
19
20echo "String Before...\n";
21var_dump($string);
22echo "\nString after...\n";
23
24var_dump(eregi_replace('([[:lower:]]+) word', '\\1_character', $string));
25
26echo "Done";
27?>
28
29--EXPECTF--
30*** Testing eregi_replace() : basic functionality ***
31String Before...
32string(50) "UPPERCASE WORDS, lowercase words, MIxED CaSe woRdS"
33
34String after...
35
36Deprecated: Function eregi_replace() is deprecated in %s on line %d
37string(65) "UPPERCASE_characterS, lowercase_characters, MIxED CaSe_characterS"
38Done
39