Lines Matching refs:explode
2 Test explode() function
8 echo "*** Testing explode() for basic operations ***\n";
31 var_dump( explode($delimiter, $string, -1) );
36 var_dump( explode($delimiter, $string, 0) );
41 var_dump( explode($delimiter, $string, 1) );
46 var_dump( explode($delimiter, $string, 2) );
53 echo "\n*** Testing explode() with miscellaneous input arguments ***\n";
55 echo "\n-- Passing positive values of Limit to explode() --\n";
57 var_dump( explode("::", "mon::tues::wed::thurs::fri::sat::sun", 2) );
60 echo "\n-- Passing limit values 0 and 1 to explode() --\n";
61 var_dump( explode(":", "Name:Phone:Address:City:State", 0) );
62 var_dump( explode(":", "Name:Phone:Address:City:State", 1) );
66 echo "\n*** Testing explode() for maximum limit of string with Limit = -1 ***\n";
67 var_dump( explode(":", "1:2:3:4:5:6:7:7:5:6:7:3:4:5:2:8:9:0:5:5:5:5:5:5:5:5:5:5:5:5:55:5:5:5%:%:%:%…
69 echo "\n*** Testing explode() with string variations as input argument ***\n";
72 var_dump( explode("\t\n", "1234\t\n5678\n\t9100") );
73 var_dump( explode("\r", "1234\rabcd\r5678\rrstu") );
77 var_dump( explode("\x00", "abcd\x0n1234\x0005678\x0000efgh\xijkl") );
78 var_dump( explode("\0", "abcd\0efgh\0ijkl\x00mnop\x000qrst\00uvwx\000yz") );
81 echo "\n*** Testing explode() with objects ***\n";
88 var_dump( explode("b", $obj) );
92 *** Testing explode() for basic operations ***
94 explode(): Argument #1 ($separator) cannot be empty
95 explode(): Argument #1 ($separator) cannot be empty
96 explode(): Argument #1 ($separator) cannot be empty
97 explode(): Argument #1 ($separator) cannot be empty
99 explode(): Argument #1 ($separator) cannot be empty
100 explode(): Argument #1 ($separator) cannot be empty
101 explode(): Argument #1 ($separator) cannot be empty
102 explode(): Argument #1 ($separator) cannot be empty
204 explode(): Argument #1 ($separator) cannot be empty
205 explode(): Argument #1 ($separator) cannot be empty
206 explode(): Argument #1 ($separator) cannot be empty
207 explode(): Argument #1 ($separator) cannot be empty
299 *** Testing explode() with miscellaneous input arguments ***
301 -- Passing positive values of Limit to explode() --
309 -- Passing limit values 0 and 1 to explode() --
319 *** Testing explode() for maximum limit of string with Limit = -1 ***
425 *** Testing explode() with string variations as input argument ***
474 *** Testing explode() with objects ***