Busybox: Upgrade to 1.21.1 (stable). lsof active.
[tomato.git] / release / src / router / php / ext / ereg / tests / spliti_error_002.phpt
blob19dd171655c80bae498c3ca81e6f502f946dd734
1 --TEST--
2 Test spliti() function : error conditions - test bad regular expressions
3 --FILE--
4 <?php
5 /* Prototype  : proto array spliti(string pattern, string string [, int limit])
6  * Description: spliti string into array by regular expression 
7  * Source code: ext/standard/reg.c
8  * Alias to functions: 
9  */
12  * Test bad regular expressions
13  */
15 echo "*** Testing spliti() : error conditions ***\n";
17 $regs = 'original';
19 var_dump(spliti("", "hello"));
20 var_dump(spliti("c(d", "hello"));
21 var_dump(spliti("a[b", "hello"));
22 var_dump(spliti("c(d", "hello"));
23 var_dump(spliti("*", "hello"));
24 var_dump(spliti("+", "hello"));
25 var_dump(spliti("?", "hello"));
26 var_dump(spliti("(+?*)", "hello", $regs));
27 var_dump(spliti("h{256}", "hello"));
28 var_dump(spliti("h|", "hello"));
29 var_dump(spliti("h{0}", "hello"));
30 var_dump(spliti("h{2,1}", "hello"));
31 var_dump(spliti('[a-c-e]', 'd'));
32 var_dump(spliti('\\', 'x'));
33 var_dump(spliti('([9-0])', '1', $regs));
35 //ensure $regs unchanged
36 var_dump($regs);
38 echo "Done";
40 --EXPECTF--
41 *** Testing spliti() : error conditions ***
43 Deprecated: Function spliti() is deprecated in %s on line %d
45 Warning: spliti(): REG_EMPTY in %s on line %d
46 bool(false)
48 Deprecated: Function spliti() is deprecated in %s on line %d
50 Warning: spliti(): REG_EPAREN in %s on line %d
51 bool(false)
53 Deprecated: Function spliti() is deprecated in %s on line %d
55 Warning: spliti(): REG_EBRACK in %s on line %d
56 bool(false)
58 Deprecated: Function spliti() is deprecated in %s on line %d
60 Warning: spliti(): REG_EPAREN in %s on line %d
61 bool(false)
63 Deprecated: Function spliti() is deprecated in %s on line %d
65 Warning: spliti(): REG_BADRPT in %s on line %d
66 bool(false)
68 Deprecated: Function spliti() is deprecated in %s on line %d
70 Warning: spliti(): REG_BADRPT in %s on line %d
71 bool(false)
73 Deprecated: Function spliti() is deprecated in %s on line %d
75 Warning: spliti(): REG_BADRPT in %s on line %d
76 bool(false)
78 Deprecated: Function spliti() is deprecated in %s on line %d
80 Warning: spliti() expects parameter 3 to be long, string given in %s on line %d
81 NULL
83 Deprecated: Function spliti() is deprecated in %s on line %d
85 Warning: spliti(): REG_BADBR in %s on line %d
86 bool(false)
88 Deprecated: Function spliti() is deprecated in %s on line %d
90 Warning: spliti(): REG_EMPTY in %s on line %d
91 bool(false)
93 Deprecated: Function spliti() is deprecated in %s on line %d
95 Warning: spliti(): REG_EMPTY in %s on line %d
96 bool(false)
98 Deprecated: Function spliti() is deprecated in %s on line %d
100 Warning: spliti(): REG_BADBR in %s on line %d
101 bool(false)
103 Deprecated: Function spliti() is deprecated in %s on line %d
105 Warning: spliti(): REG_ERANGE in %s on line %d
106 bool(false)
108 Deprecated: Function spliti() is deprecated in %s on line %d
110 Warning: spliti(): REG_EESCAPE in %s on line %d
111 bool(false)
113 Deprecated: Function spliti() is deprecated in %s on line %d
115 Warning: spliti() expects parameter 3 to be long, string given in %s on line %d
116 NULL
117 string(8) "original"
118 Done