Lines Matching refs:explode
2 Test explode() function
8 /* Prototype: array explode ( string $delimiter, string $string [, int $limit] );
15 echo "*** Testing explode() for basic operations ***\n";
36 var_dump( explode($delimiter, $string, -1) );
37 var_dump( explode($delimiter, $string, 0) );
38 var_dump( explode($delimiter, $string, 1) );
39 var_dump( explode($delimiter, $string, 2) );
43 echo "\n*** Testing explode() with miscelleneous input arguments ***\n";
45 echo "\n-- Passing positive values of Limit to explode() --\n";
47 var_dump( explode("::", "mon::tues::wed::thurs::fri::sat::sun", 2) );
50 echo "\n-- Passing limit values 0 and 1 to explode() --\n";
51 var_dump( explode(":", "Name:Phone:Address:City:State", 0) );
52 var_dump( explode(":", "Name:Phone:Address:City:State", 1) );
56 echo "\n*** Testing explode() for maximum limit of string with Limit = -1 ***\n";
57 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%:%:%:%…
59 echo "\n*** Testing explode() with string variations as input argument ***\n";
62 var_dump( explode("\t\n", "1234\t\n5678\n\t9100") );
63 var_dump( explode("\r", "1234\rabcd\r5678\rrstu") );
67 var_dump( explode("\x00", "abcd\x0n1234\x0005678\x0000efgh\xijkl") );
68 var_dump( explode("\0", "abcd\0efgh\0ijkl\x00mnop\x000qrst\00uvwx\000yz") );
71 echo "\n*** Testing explode() with objects ***\n";
78 var_dump( explode("b", $obj) );
82 var_dump( explode(":", "array1:array2:array3", -1, -33) );
83 var_dump( explode(":") );
88 *** Testing explode() for basic operations ***
91 Warning: explode(): Empty delimiter in %s on line %d
94 Warning: explode(): Empty delimiter in %s on line %d
97 Warning: explode(): Empty delimiter in %s on line %d
100 Warning: explode(): Empty delimiter in %s on line %d
104 Warning: explode(): Empty delimiter in %s on line %d
107 Warning: explode(): Empty delimiter in %s on line %d
110 Warning: explode(): Empty delimiter in %s on line %d
113 Warning: explode(): Empty delimiter in %s on line %d
217 Warning: explode(): Empty delimiter in %s on line %d
220 Warning: explode(): Empty delimiter in %s on line %d
223 Warning: explode(): Empty delimiter in %s on line %d
226 Warning: explode(): Empty delimiter in %s on line %d
319 *** Testing explode() with miscelleneous input arguments ***
321 -- Passing positive values of Limit to explode() --
329 -- Passing limit values 0 and 1 to explode() --
339 *** Testing explode() for maximum limit of string with Limit = -1 ***
445 *** Testing explode() with string variations as input argument ***
494 *** Testing explode() with objects ***
504 Warning: explode() expects at most 3 parameters, 4 given in %s on line %d
507 Warning: explode() expects at least 2 parameters, 1 given in %s on line %d