New parameter parsing API

This commit is contained in:
Olivier Hill 2008-06-25 12:16:17 +00:00
parent 624c8f2f66
commit c5ec48e858
28 changed files with 431 additions and 506 deletions

File diff suppressed because it is too large Load Diff

View File

@ -19,12 +19,12 @@ echo "Done\n";
--EXPECTF--
*** Testing error conditions ***
Warning: Wrong parameter count for addcslashes() in %s on line %d
Warning: addcslashes() expects exactly 2 parameters, 0 given in %s on line %d
NULL
Warning: Wrong parameter count for addcslashes() in %s on line %d
Warning: addcslashes() expects exactly 2 parameters, 1 given in %s on line %d
NULL
Warning: Wrong parameter count for addcslashes() in %s on line %d
Warning: addcslashes() expects exactly 2 parameters, 3 given in %s on line %d
NULL
Done

View File

@ -33,12 +33,12 @@ echo "Done\n";
-- Testing addslashes() function with Zero arguments --
Warning: Wrong parameter count for addslashes() in %s on line %d
Warning: addslashes() expects exactly 1 parameter, 0 given in %s on line %d
NULL
-- Testing addslashes() function with more than expected no. of arguments --
Warning: Wrong parameter count for addslashes() in %s on line %d
Warning: addslashes() expects exactly 1 parameter, 2 given in %s on line %d
NULL
string(15) ""hello"\"world""
Done

View File

@ -125,24 +125,24 @@ string(7) "1.06E-9"
string(3) "0.5"
-- Iteration 10 --
Notice: Array to string conversion in %s on line %d
string(5) "Array"
Warning: addslashes() expects parameter 1 to be string, array given in %s on line %d
NULL
-- Iteration 11 --
Notice: Array to string conversion in %s on line %d
string(5) "Array"
Warning: addslashes() expects parameter 1 to be string, array given in %s on line %d
NULL
-- Iteration 12 --
Notice: Array to string conversion in %s on line %d
string(5) "Array"
Warning: addslashes() expects parameter 1 to be string, array given in %s on line %d
NULL
-- Iteration 13 --
Notice: Array to string conversion in %s on line %d
string(5) "Array"
Warning: addslashes() expects parameter 1 to be string, array given in %s on line %d
NULL
-- Iteration 14 --
Notice: Array to string conversion in %s on line %d
string(5) "Array"
Warning: addslashes() expects parameter 1 to be string, array given in %s on line %d
NULL
-- Iteration 15 --
string(1) "1"
-- Iteration 16 --
@ -162,7 +162,9 @@ string(0) ""
-- Iteration 23 --
string(7) "obj\'ct"
-- Iteration 24 --
string(%d) "Resource id #%d"
Warning: addslashes() expects parameter 1 to be string, resource given in %s on line %d
NULL
-- Iteration 25 --
string(0) ""
-- Iteration 26 --

View File

@ -25,10 +25,10 @@ echo "Done";
*** Testing nl2br() : error conditions ***
-- Testing nl2br() function with Zero arguments --
Warning: Wrong parameter count for nl2br() in %s on line %d
Warning: nl2br() expects exactly 1 parameter, 0 given in %s on line %d
NULL
-- Testing nl2br() function with more than expected no. of arguments --
Warning: Wrong parameter count for nl2br() in %s on line %d
Warning: nl2br() expects exactly 1 parameter, 2 given in %s on line %d
NULL
Done

View File

@ -109,24 +109,24 @@ string(7) "1.06E-9"
string(3) "0.5"
-- Iteration 10 --
Notice: Array to string conversion in %s on line %d
string(5) "Array"
Warning: nl2br() expects parameter 1 to be string, array given in %s on line %d
NULL
-- Iteration 11 --
Notice: Array to string conversion in %s on line %d
string(5) "Array"
Warning: nl2br() expects parameter 1 to be string, array given in %s on line %d
NULL
-- Iteration 12 --
Notice: Array to string conversion in %s on line %d
string(5) "Array"
Warning: nl2br() expects parameter 1 to be string, array given in %s on line %d
NULL
-- Iteration 13 --
Notice: Array to string conversion in %s on line %d
string(5) "Array"
Warning: nl2br() expects parameter 1 to be string, array given in %s on line %d
NULL
-- Iteration 14 --
Notice: Array to string conversion in %s on line %d
string(5) "Array"
Warning: nl2br() expects parameter 1 to be string, array given in %s on line %d
NULL
-- Iteration 15 --
string(0) ""
-- Iteration 16 --
@ -140,7 +140,9 @@ string(1) "1"
-- Iteration 20 --
string(0) ""
-- Iteration 21 --
string(%d) "Resource id #%d"
Warning: nl2br() expects parameter 1 to be string, resource given in %s on line %d
NULL
-- Iteration 22 --
string(9) "My String"
-- Iteration 23 --

View File

@ -48,13 +48,13 @@ var_dump($Data = str_ireplace("\n", "<br>", $Data));
echo "Done\n";
?>
--EXPECTF--
Warning: Wrong parameter count for str_ireplace() in %s on line %d
Warning: str_ireplace() expects at least 3 parameters, 0 given in %s on line %d
NULL
Warning: Wrong parameter count for str_ireplace() in %s on line %d
Warning: str_ireplace() expects at least 3 parameters, 1 given in %s on line %d
NULL
Warning: Wrong parameter count for str_ireplace() in %s on line %d
Warning: str_ireplace() expects at least 3 parameters, 2 given in %s on line %d
NULL
string(0) ""
string(8) "aaaaaaaT"

View File

@ -940,18 +940,18 @@ string(5) "FOUND"
string(5) "FOUND"
*** Testing error conditions ***
Warning: Wrong parameter count for str_replace() in %s on line %d
Warning: str_replace() expects at least 3 parameters, 0 given in %s on line %d
NULL
Warning: Wrong parameter count for str_replace() in %s on line %d
Warning: str_replace() expects at least 3 parameters, 1 given in %s on line %d
NULL
Warning: Wrong parameter count for str_replace() in %s on line %d
Warning: str_replace() expects at least 3 parameters, 1 given in %s on line %d
NULL
Warning: Wrong parameter count for str_replace() in %s on line %d
Warning: str_replace() expects at least 3 parameters, 2 given in %s on line %d
NULL
Warning: Wrong parameter count for str_replace() in %s on line %d
Warning: str_replace() expects at most 4 parameters, 5 given in %s on line %d
NULL
Done

View File

@ -30,11 +30,11 @@ echo "Done";
-- Testing strip_tags() function with Zero arguments --
Warning: Wrong parameter count for strip_tags() in %s on line %d
Warning: strip_tags() expects at least 1 parameter, 0 given in %s on line %d
NULL
-- Testing strip_tags() function with more than expected no. of arguments --
Warning: Wrong parameter count for strip_tags() in %s on line %d
Warning: strip_tags() expects at most 2 parameters, 3 given in %s on line %d
NULL
Done

View File

@ -112,24 +112,24 @@ string(7) "1.06E-9"
string(3) "0.5"
-- Iteration 10 --
Notice: Array to string conversion in %s on line %d
string(5) "Array"
Warning: strip_tags() expects parameter 1 to be string, array given in %s on line %d
NULL
-- Iteration 11 --
Notice: Array to string conversion in %s on line %d
string(5) "Array"
Warning: strip_tags() expects parameter 1 to be string, array given in %s on line %d
NULL
-- Iteration 12 --
Notice: Array to string conversion in %s on line %d
string(5) "Array"
Warning: strip_tags() expects parameter 1 to be string, array given in %s on line %d
NULL
-- Iteration 13 --
Notice: Array to string conversion in %s on line %d
string(5) "Array"
Warning: strip_tags() expects parameter 1 to be string, array given in %s on line %d
NULL
-- Iteration 14 --
Notice: Array to string conversion in %s on line %d
string(5) "Array"
Warning: strip_tags() expects parameter 1 to be string, array given in %s on line %d
NULL
-- Iteration 15 --
string(0) ""
-- Iteration 16 --
@ -153,5 +153,7 @@ string(0) ""
-- Iteration 25 --
string(0) ""
-- Iteration 26 --
string(%d) "Resource id #%d"
Warning: strip_tags() expects parameter 1 to be string, resource given in %s on line %d
NULL
Done

View File

@ -112,34 +112,24 @@ string(7) "1.06E-9"
string(3) "0.5"
-- Iteration 10 --
Notice: Array to string conversion in %s on line %d
Notice: Array to string conversion in %s on line %d
string(5) "Array"
Warning: strip_tags() expects parameter 1 to be string, array given in %s on line %d
NULL
-- Iteration 11 --
Notice: Array to string conversion in %s on line %d
Notice: Array to string conversion in %s on line %d
string(5) "Array"
Warning: strip_tags() expects parameter 1 to be string, array given in %s on line %d
NULL
-- Iteration 12 --
Notice: Array to string conversion in %s on line %d
Notice: Array to string conversion in %s on line %d
string(5) "Array"
Warning: strip_tags() expects parameter 1 to be string, array given in %s on line %d
NULL
-- Iteration 13 --
Notice: Array to string conversion in %s on line %d
Notice: Array to string conversion in %s on line %d
string(5) "Array"
Warning: strip_tags() expects parameter 1 to be string, array given in %s on line %d
NULL
-- Iteration 14 --
Notice: Array to string conversion in %s on line %d
Notice: Array to string conversion in %s on line %d
string(5) "Array"
Warning: strip_tags() expects parameter 1 to be string, array given in %s on line %d
NULL
-- Iteration 15 --
string(0) ""
-- Iteration 16 --
@ -163,5 +153,7 @@ string(0) ""
-- Iteration 25 --
string(0) ""
-- Iteration 26 --
string(%d) "Resource id #%d"
Warning: strip_tags() expects parameter 1 to be string, resource given in %s on line %d
NULL
Done

View File

@ -32,12 +32,12 @@ echo "Done\n";
-- Testing stripslashes() function with Zero arguments --
Warning: Wrong parameter count for stripslashes() in %s on line %d
Warning: stripslashes() expects exactly 1 parameter, 0 given in %s on line %d
NULL
-- Testing stripslashes() function with more than expected no. of arguments --
Warning: Wrong parameter count for stripslashes() in %s on line %d
Warning: stripslashes() expects exactly 1 parameter, 2 given in %s on line %d
NULL
string(18) "\"hello\"\"world\""
Done

View File

@ -125,24 +125,24 @@ string(7) "1.06E-9"
string(3) "0.5"
-- Iteration 10 --
Notice: Array to string conversion in %s on line %d
string(5) "Array"
Warning: stripslashes() expects parameter 1 to be string, array given in %s on line %d
NULL
-- Iteration 11 --
Notice: Array to string conversion in %s on line %d
string(5) "Array"
Warning: stripslashes() expects parameter 1 to be string, array given in %s on line %d
NULL
-- Iteration 12 --
Notice: Array to string conversion in %s on line %d
string(5) "Array"
Warning: stripslashes() expects parameter 1 to be string, array given in %s on line %d
NULL
-- Iteration 13 --
Notice: Array to string conversion in %s on line %d
string(5) "Array"
Warning: stripslashes() expects parameter 1 to be string, array given in %s on line %d
NULL
-- Iteration 14 --
Notice: Array to string conversion in %s on line %d
string(5) "Array"
Warning: stripslashes() expects parameter 1 to be string, array given in %s on line %d
NULL
-- Iteration 15 --
string(1) "1"
-- Iteration 16 --
@ -162,7 +162,9 @@ string(0) ""
-- Iteration 23 --
string(6) "obj'ct"
-- Iteration 24 --
string(%d) "Resource id #%d"
Warning: stripslashes() expects parameter 1 to be string, resource given in %s on line %d
NULL
-- Iteration 25 --
string(0) ""
-- Iteration 26 --

View File

@ -18,10 +18,10 @@ echo "*** Done ***";
--EXPECTF--
*** Testing strrev() : error conditions ***
-- Testing strrev() function with Zero arguments --
Warning: Wrong parameter count for strrev() in %s on line %d
Warning: strrev() expects exactly 1 parameter, 0 given in %s on line %d
NULL
-- Testing strrev() function with more than expected no. of arguments --
Warning: Wrong parameter count for strrev() in %s on line %d
Warning: strrev() expects exactly 1 parameter, 2 given in %s on line %d
NULL
*** Done ***

View File

@ -119,28 +119,28 @@ string(3) "5.0"
-- Iterator 10 --
Notice: Array to string conversion in %s on line %d
string(5) "yarrA"
Warning: strrev() expects parameter 1 to be string, array given in %s on line %d
NULL
-- Iterator 11 --
Notice: Array to string conversion in %s on line %d
string(5) "yarrA"
Warning: strrev() expects parameter 1 to be string, array given in %s on line %d
NULL
-- Iterator 12 --
Notice: Array to string conversion in %s on line %d
string(5) "yarrA"
Warning: strrev() expects parameter 1 to be string, array given in %s on line %d
NULL
-- Iterator 13 --
Notice: Array to string conversion in %s on line %d
string(5) "yarrA"
Warning: strrev() expects parameter 1 to be string, array given in %s on line %d
NULL
-- Iterator 14 --
Notice: Array to string conversion in %s on line %d
string(5) "yarrA"
Warning: strrev() expects parameter 1 to be string, array given in %s on line %d
NULL
-- Iterator 15 --
string(0) ""
@ -170,7 +170,9 @@ string(0) ""
string(6) "tcejbo"
-- Iterator 24 --
string(%d) "%d# di ecruoseR"
Warning: strrev() expects parameter 1 to be string, resource given in %s on line %d
NULL
-- Iterator 25 --
string(0) ""

View File

@ -28,14 +28,14 @@ echo "Done";
*** Testing strtr() : error conditions ***
-- Testing strtr() function with Zero arguments --
Warning: Wrong parameter count for strtr() in %s on line %d
Warning: strtr() expects at least 2 parameters, 0 given in %s on line %d
NULL
-- Testing strtr() function with less than expected no. of arguments --
Warning: Wrong parameter count for strtr() in %s on line %d
Warning: strtr() expects at least 2 parameters, 1 given in %s on line %d
NULL
-- Testing strtr() function with more than expected no. of arguments --
Warning: Wrong parameter count for strtr() in %s on line %d
Warning: strtr() expects at most 3 parameters, 4 given in %s on line %d
NULL
Done

View File

@ -104,16 +104,16 @@ string(5) "-ma.5"
string(12) "ta5aaaaaaaaa"
-- Iteration 7 --
Notice: Array to string conversion in %s on line %d
string(5) "Arr0y"
Warning: strtr() expects parameter 1 to be string, array given in %s on line %d
NULL
-- Iteration 8 --
Notice: Array to string conversion in %s on line %d
string(5) "Arr0y"
Warning: strtr() expects parameter 1 to be string, array given in %s on line %d
NULL
-- Iteration 9 --
Notice: Array to string conversion in %s on line %d
string(5) "Arr0y"
Warning: strtr() expects parameter 1 to be string, array given in %s on line %d
NULL
-- Iteration 10 --
string(1) "t"
-- Iteration 11 --
@ -129,7 +129,9 @@ string(0) ""
-- Iteration 16 --
string(13) "s02ple objec1"
-- Iteration 17 --
string(%d) "Resource id #%d"
Warning: strtr() expects parameter 1 to be string, resource given in %s on line %d
NULL
-- Iteration 18 --
string(0) ""
-- Iteration 19 --

View File

@ -111,18 +111,18 @@ string(6) "000105"
-- Iteration 7 --
Notice: Array to string conversion in %s on line %d
string(6) "ay2Arr"
Warning: strtr() expects parameter 3 to be string, array given in %s on line %d
NULL
-- Iteration 8 --
Notice: Array to string conversion in %s on line %d
string(6) "ay2Arr"
Warning: strtr() expects parameter 3 to be string, array given in %s on line %d
NULL
-- Iteration 9 --
Notice: Array to string conversion in %s on line %d
string(6) "ay2Arr"
Warning: strtr() expects parameter 3 to be string, array given in %s on line %d
NULL
-- Iteration 10 --
string(6) "0121tm"
@ -146,7 +146,9 @@ string(6) "012atm"
string(6) "plesam"
-- Iteration 17 --
string(6) "ourRes"
Warning: strtr() expects parameter 3 to be string, resource given in %s on line %d
NULL
-- Iteration 18 --
string(6) "012atm"

View File

@ -123,63 +123,43 @@ bool(false)
-- Iteration 7 --
Notice: Array to string conversion in %s on line %d
Warning: strtr() expects parameter 1 to be string, array given in %s on line %d
NULL
Notice: Array to string conversion in %s on line %d
Notice: Array to string conversion in %s on line %d
string(5) "Array"
Notice: Array to string conversion in %s on line %d
string(5) "Array"
Warning: strtr() expects parameter 1 to be string, array given in %s on line %d
NULL
-- Iteration 8 --
Notice: Array to string conversion in %s on line %d
Warning: strtr() expects parameter 1 to be string, array given in %s on line %d
NULL
Notice: Array to string conversion in %s on line %d
Notice: Array to string conversion in %s on line %d
string(5) "Array"
Notice: Array to string conversion in %s on line %d
string(5) "Array"
Warning: strtr() expects parameter 1 to be string, array given in %s on line %d
NULL
-- Iteration 9 --
Notice: Array to string conversion in %s on line %d
Warning: strtr() expects parameter 1 to be string, array given in %s on line %d
NULL
Notice: Array to string conversion in %s on line %d
Notice: Array to string conversion in %s on line %d
string(5) "Array"
Notice: Array to string conversion in %s on line %d
string(5) "Array"
Warning: strtr() expects parameter 1 to be string, array given in %s on line %d
NULL
-- Iteration 10 --
Notice: Array to string conversion in %s on line %d
Warning: strtr() expects parameter 1 to be string, array given in %s on line %d
NULL
Notice: Array to string conversion in %s on line %d
Notice: Array to string conversion in %s on line %d
string(5) "Array"
Notice: Array to string conversion in %s on line %d
string(5) "Array"
Warning: strtr() expects parameter 1 to be string, array given in %s on line %d
NULL
-- Iteration 11 --
Notice: Array to string conversion in %s on line %d
Warning: strtr() expects parameter 1 to be string, array given in %s on line %d
NULL
Notice: Array to string conversion in %s on line %d
Notice: Array to string conversion in %s on line %d
string(5) "Array"
Notice: Array to string conversion in %s on line %d
string(5) "Array"
Warning: strtr() expects parameter 1 to be string, array given in %s on line %d
NULL
-- Iteration 12 --
string(1) "1"
@ -224,10 +204,12 @@ Warning: strtr(): The second argument is not an array in %s on line %d
bool(false)
-- Iteration 19 --
string(%d) "Resource id #%d"
Warning: strtr(): The second argument is not an array in %s on line %d
bool(false)
Warning: strtr() expects parameter 1 to be string, resource given in %s on line %d
NULL
Warning: strtr() expects parameter 1 to be string, resource given in %s on line %d
NULL
-- Iteration 20 --
string(0) ""

View File

@ -30,12 +30,12 @@ echo "Done\n";
--EXPECTF--
*** Testing error conditions ***
Warning: Wrong parameter count for substr_count() in %s on line %d
Warning: substr_count() expects at least 2 parameters, 0 given in %s on line %d
NULL
Notice: Undefined variable: str in %s on line %d
Warning: Wrong parameter count for substr_count() in %s on line %d
Warning: substr_count() expects at most 4 parameters, 5 given in %s on line %d
NULL
Notice: Undefined variable: str in %s on line %d
@ -55,8 +55,8 @@ bool(false)
Notice: Undefined variable: str in %s on line %d
Warning: substr_count(): Length should be greater than 0 in %s on line %d
bool(false)
Warning: substr_count() expects parameter 3 to be long, string given in %s on line %d
NULL
Notice: Undefined variable: str in %s on line %d

View File

@ -57,13 +57,25 @@ echo "Done\n";
-- 3rd or 4th arg as string --
int(1)
int(1)
Notice: A non well formed numeric value encountered in %s on line %d
int(2)
Notice: A non well formed numeric value encountered in %s on line %d
Notice: A non well formed numeric value encountered in %s on line %d
int(2)
-- 3rd or 4th arg as NULL --
int(2)
int(0)
int(2)
Warning: substr_count() expects parameter 3 to be long, string given %s on line %d
NULL
Warning: substr_count() expects parameter 3 to be long, string given %s on line %d
NULL
Warning: substr_count() expects parameter 3 to be long, string given %s on line %d
NULL
int(0)
int(2)

View File

@ -31,12 +31,12 @@ echo "Done\n";
-- Testing ucwords() function with Zero arguments --
Warning: Wrong parameter count for ucwords() in %s on line %d
Warning: ucwords() expects exactly 1 parameter, 0 given in %s on line %d
NULL
-- Testing ucwords() function with more than expected no. of arguments --
Warning: Wrong parameter count for ucwords() in %s on line %d
Warning: ucwords() expects exactly 1 parameter, 2 given in %s on line %d
NULL
string(10) "string_val"
Done

View File

@ -146,24 +146,24 @@ string(13) "1.07654321E-9"
string(3) "0.5"
-- Iteration 16 --
Notice: Array to string conversion in %s on line %d
string(5) "Array"
Warning: ucwords() expects parameter 1 to be string, array given in %s on line %d
NULL
-- Iteration 17 --
Notice: Array to string conversion in %s on line %d
string(5) "Array"
Warning: ucwords() expects parameter 1 to be string, array given in %s on line %d
NULL
-- Iteration 18 --
Notice: Array to string conversion in %s on line %d
string(5) "Array"
Warning: ucwords() expects parameter 1 to be string, array given in %s on line %d
NULL
-- Iteration 19 --
Notice: Array to string conversion in %s on line %d
string(5) "Array"
Warning: ucwords() expects parameter 1 to be string, array given in %s on line %d
NULL
-- Iteration 20 --
Notice: Array to string conversion in %s on line 101
string(5) "Array"
Warning: ucwords() expects parameter 1 to be string, array given in %s on line %d
NULL
-- Iteration 21 --
string(1) "1"
-- Iteration 22 --
@ -195,5 +195,7 @@ string(0) ""
-- Iteration 35 --
string(0) ""
-- Iteration 36 --
string(%d) "Resource Id #%d"
Done
Warning: ucwords() expects parameter 1 to be string, resource given in %s on line %d
NULL
Done