Annotation of embedaddon/php/ext/ereg/tests/split_basic_003.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: Test split() function : basic functionality - a few non-matches
3: --FILE--
4: <?php
5: /* Prototype : proto array split(string pattern, string string [, int limit])
6: * Description: split string into array by regular expression
7: * Source code: ext/standard/reg.c
8: * Alias to functions:
9: */
10:
11: $replacement = 'r';
12:
13: var_dump(split('A', '-- a --'));
14: var_dump(split('[A-Z]', '-- 0 --'));
15: var_dump(split('(a){4}', '--- aaa ---'));
16: var_dump(split('^a', '--- ba ---'));
17: var_dump(split('b$', '--- ba ---'));
18: var_dump(split('[:alpha:]', '--- x ---'));
19:
20:
21: echo "Done";
22: ?>
23: --EXPECTF--
24: Deprecated: Function split() is deprecated in %s on line %d
25: array(1) {
26: [0]=>
27: string(7) "-- a --"
28: }
29:
30: Deprecated: Function split() is deprecated in %s on line %d
31: array(1) {
32: [0]=>
33: string(7) "-- 0 --"
34: }
35:
36: Deprecated: Function split() is deprecated in %s on line %d
37: array(1) {
38: [0]=>
39: string(11) "--- aaa ---"
40: }
41:
42: Deprecated: Function split() is deprecated in %s on line %d
43: array(1) {
44: [0]=>
45: string(10) "--- ba ---"
46: }
47:
48: Deprecated: Function split() is deprecated in %s on line %d
49: array(1) {
50: [0]=>
51: string(10) "--- ba ---"
52: }
53:
54: Deprecated: Function split() is deprecated in %s on line %d
55: array(1) {
56: [0]=>
57: string(9) "--- x ---"
58: }
59: Done
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>