Busybox: Upgrade to 1.21.1 (stable). lsof active.
[tomato.git] / release / src / router / php / ext / ereg / tests / split_variation_004.phpt
blob1fa71edd38460e9dcf4544c48da7b9222effe521
1 --TEST--
2 Test split() function : usage variations  - out-of-range values for limit
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 function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
12         echo "Error: $err_no - $err_msg, $filename($linenum)\n";
14 set_error_handler('test_error_handler');
15 echo "*** Testing split() : usage variations ***\n";
17 $pattern = '[[:space:]]';
18 $string = '1 2 3 4 5';
19 var_dump(split($pattern, $string, 0));
20 var_dump(split($pattern, $string, -10));
21 var_dump(split($pattern, $string, 10E20));
24 echo "Done";
26 --EXPECTF--
27 *** Testing split() : usage variations ***
28 Error: 8192 - Function split() is deprecated, %s(16)
29 array(1) {
30   [0]=>
31   string(9) "1 2 3 4 5"
33 Error: 8192 - Function split() is deprecated, %s(17)
34 array(1) {
35   [0]=>
36   string(9) "1 2 3 4 5"
38 Error: 8192 - Function split() is deprecated, %s(18)
39 array(1) {
40   [0]=>
41   string(9) "1 2 3 4 5"
43 Done