1--TEST--
2Test eregi_replace() function : basic functionality - a few non-matches
3--FILE--
4<?php
5/* Prototype  : proto string eregi_replace(string pattern, string replacement, string string)
6 * Description: Replace regular expression
7 * Source code: ext/standard/reg.c
8 * Alias to functions:
9 */
10
11$replacement = 'r';
12
13var_dump(eregi_replace('[A-Z]', $replacement, '0'));
14var_dump(eregi_replace('(a){4}', $replacement, 'aaa'));
15var_dump(eregi_replace('^a', $replacement, 'ba'));
16var_dump(eregi_replace('b$', $replacement, 'ba'));
17var_dump(eregi_replace('[:alpha:]', $replacement, 'x'));
18
19
20echo "Done";
21?>
22--EXPECTF--
23Deprecated: Function eregi_replace() is deprecated in %s on line %d
24string(1) "0"
25
26Deprecated: Function eregi_replace() is deprecated in %s on line %d
27string(3) "aaa"
28
29Deprecated: Function eregi_replace() is deprecated in %s on line %d
30string(2) "ba"
31
32Deprecated: Function eregi_replace() is deprecated in %s on line %d
33string(2) "ba"
34
35Deprecated: Function eregi_replace() is deprecated in %s on line %d
36string(1) "x"
37Done
38