Busybox: Upgrade to 1.21.1 (stable). lsof active.
[tomato.git] / release / src / router / php / ext / ereg / tests / split_basic_003.phpt
blob8767144f7db1f6125e3e4ae802eb21e87c45ac81
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  */
11 $replacement = 'r';
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 ---'));
21 echo "Done";
23 --EXPECTF--
24 Deprecated: Function split() is deprecated in %s on line %d
25 array(1) {
26   [0]=>
27   string(7) "-- a --"
30 Deprecated: Function split() is deprecated in %s on line %d
31 array(1) {
32   [0]=>
33   string(7) "-- 0 --"
36 Deprecated: Function split() is deprecated in %s on line %d
37 array(1) {
38   [0]=>
39   string(11) "--- aaa ---"
42 Deprecated: Function split() is deprecated in %s on line %d
43 array(1) {
44   [0]=>
45   string(10) "--- ba ---"
48 Deprecated: Function split() is deprecated in %s on line %d
49 array(1) {
50   [0]=>
51   string(10) "--- ba ---"
54 Deprecated: Function split() is deprecated in %s on line %d
55 array(1) {
56   [0]=>
57   string(9) "--- x ---"
59 Done