Lines Matching refs:substr_replace
2 Test substr_replace() function : error conditions
5 /* Prototype : mixed substr_replace ( mixed $string , string $replacement , int $start [, int …
11 * Testing substr_replace() for error conditions
14 echo "*** Testing substr_replace() : error conditions ***\n";
18 echo "\n-- Testing substr_replace() function with less than expected no. of arguments --\n";
19 var_dump(substr_replace());
20 var_dump(substr_replace($s1, "evening"));
22 echo "\n-- Testing substr_replace() function with more than expected no. of arguments --\n";
23 var_dump(substr_replace($s1, "evening", 5, 7, true));
25 echo "\n-- Testing substr_replace() function with start and length different types --\n";
26 var_dump(substr_replace($s1, "evening", array(5)));
27 var_dump(substr_replace($s1, "evening", 5, array(8)));
29 echo "\n-- Testing substr_replace() function with start and length with a different number of eleme…
30 var_dump(substr_replace($s1, "evening", array(5, 1), array(8)));
32 echo "\n-- Testing substr_replace() function with start and length as arrays but string not--\n";
33 var_dump(substr_replace($s1, "evening", array(5), array(8)));
38 *** Testing substr_replace() : error conditions ***
40 -- Testing substr_replace() function with less than expected no. of arguments --
42 Warning: substr_replace() expects at least 3 parameters, 0 given in %s on line %d
45 Warning: substr_replace() expects at least 3 parameters, 2 given in %s on line %d
48 -- Testing substr_replace() function with more than expected no. of arguments --
50 Warning: substr_replace() expects at most 4 parameters, 5 given in %s on line %d
53 -- Testing substr_replace() function with start and length different types --
55 Warning: substr_replace(): 'start' and 'length' should be of same type - numerical or array in %s …
58 Warning: substr_replace(): 'start' and 'length' should be of same type - numerical or array in %s …
61 -- Testing substr_replace() function with start and length with a different number of elements --
63 Warning: substr_replace(): 'start' and 'length' should have the same number of elements in %s on li…
66 -- Testing substr_replace() function with start and length as arrays but string not--
68 Warning: substr_replace(): Functionality of 'start' and 'length' as arrays is not implemented in %s…