diff options
author | Antony Dovgal <tony2001@php.net> | 2006-11-16 13:01:23 +0000 |
---|---|---|
committer | Antony Dovgal <tony2001@php.net> | 2006-11-16 13:01:23 +0000 |
commit | 36d66521c9eda4bdcfd254d42e96566b4faaec45 (patch) | |
tree | 4960752bfe52f17cdc722d1c5938e5ceb4d974c8 /ext/standard/tests/general_functions/import_request.phpt | |
parent | cf64728899fee19938a4777dab3deb7dda3c9a57 (diff) | |
download | php-git-36d66521c9eda4bdcfd254d42e96566b4faaec45.tar.gz |
add new tests
Diffstat (limited to 'ext/standard/tests/general_functions/import_request.phpt')
-rw-r--r-- | ext/standard/tests/general_functions/import_request.phpt | 78 |
1 files changed, 78 insertions, 0 deletions
diff --git a/ext/standard/tests/general_functions/import_request.phpt b/ext/standard/tests/general_functions/import_request.phpt new file mode 100644 index 0000000000..23dc049db2 --- /dev/null +++ b/ext/standard/tests/general_functions/import_request.phpt @@ -0,0 +1,78 @@ +--TEST-- +import_request_variables() tests +--GET-- +a=1&b=heh&c=3&d[]=5&GLOBALS=test&1=hm +--POST-- +ap=25&bp=test&cp=blah3&dp[]=ar +--FILE-- +<?php + +var_dump(import_request_variables()); +var_dump(import_request_variables("")); +var_dump(import_request_variables("", "")); + +var_dump(import_request_variables("g", "")); +var_dump($a, $b, $c, $ap); + +var_dump(import_request_variables("g", "g_")); +var_dump($g_a, $g_b, $g_c, $g_ap, $g_1); + +var_dump(import_request_variables("GP", "i_")); +var_dump($i_a, $i_b, $i_c, $i_ap, $i_bp, $i_cp, $i_dp); + +var_dump(import_request_variables("gGg", "r_")); +var_dump($r_a, $r_b, $r_c, $r_ap); + +echo "Done\n"; +?> +--EXPECTF-- +Warning: Wrong parameter count for import_request_variables() in %s on line %d +NULL + +Notice: import_request_variables(): No prefix specified - possible security hazard in %s on line %d +NULL + +Notice: import_request_variables(): No prefix specified - possible security hazard in %s on line %d +NULL + +Notice: import_request_variables(): No prefix specified - possible security hazard in %s on line %d + +Warning: import_request_variables(): Attempted GLOBALS variable overwrite. in %s on line %d + +Warning: import_request_variables(): Numeric key detected - possible security hazard. in %s on line %d +NULL + +Notice: Undefined variable: ap in %s on line %d +string(1) "1" +string(3) "heh" +string(1) "3" +NULL +NULL + +Notice: Undefined variable: g_ap in %s on line %d + +Notice: Undefined variable: g_1 in %s on line %d +string(1) "1" +string(3) "heh" +string(1) "3" +NULL +NULL +NULL +string(1) "1" +string(3) "heh" +string(1) "3" +string(2) "25" +string(4) "test" +string(5) "blah3" +array(1) { + [0]=> + string(2) "ar" +} +NULL + +Notice: Undefined variable: r_ap in %s on line %d +string(1) "1" +string(3) "heh" +string(1) "3" +NULL +Done |