1--TEST--
2Test 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 */
10
11function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
12	echo "Error: $err_no - $err_msg, $filename($linenum)\n";
13}
14set_error_handler('test_error_handler');
15echo "*** Testing split() : usage variations ***\n";
16
17$pattern = '[[:space:]]';
18$string = '1 2 3 4 5';
19var_dump(split($pattern, $string, 0));
20var_dump(split($pattern, $string, -10));
21
22
23echo "Done";
24?>
25--EXPECTF--
26*** Testing split() : usage variations ***
27Error: 8192 - Function split() is deprecated, %s(16)
28array(1) {
29  [0]=>
30  string(9) "1 2 3 4 5"
31}
32Error: 8192 - Function split() is deprecated, %s(17)
33array(1) {
34  [0]=>
35  string(9) "1 2 3 4 5"
36}
37Done
38