1--TEST--
2Test ereg_replace() function : basic functionality - a few non-matches
3--FILE--
4<?php
5/* Prototype  : proto string ereg_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(ereg_replace('A', $replacement, 'a'));
14var_dump(ereg_replace('[A-Z]', $replacement, '0'));
15var_dump(ereg_replace('(a){4}', $replacement, 'aaa'));
16var_dump(ereg_replace('^a', $replacement, 'ba'));
17var_dump(ereg_replace('b$', $replacement, 'ba'));
18var_dump(ereg_replace('[:alpha:]', $replacement, 'x'));
19
20
21echo "Done";
22?>
23--EXPECTF--
24Deprecated: Function ereg_replace() is deprecated in %s on line %d
25string(1) "a"
26
27Deprecated: Function ereg_replace() is deprecated in %s on line %d
28string(1) "0"
29
30Deprecated: Function ereg_replace() is deprecated in %s on line %d
31string(3) "aaa"
32
33Deprecated: Function ereg_replace() is deprecated in %s on line %d
34string(2) "ba"
35
36Deprecated: Function ereg_replace() is deprecated in %s on line %d
37string(2) "ba"
38
39Deprecated: Function ereg_replace() is deprecated in %s on line %d
40string(1) "x"
41Done
42