Annotation of embedaddon/php/ext/standard/tests/general_functions/import_request1.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: import_request_variables() test (overwrite super-globals)
! 3: --GET--
! 4: GET=0&POST=1&COOKIE=2&FILES=3&REQUEST=4
! 5: --POST--
! 6: GET=5&POST=6&COOKIE=7&FILES=8&REQUEST=9
! 7: --COOKIE--
! 8: GET=10;POST=11;COOKIE=12;FILES=13;REQUEST=14
! 9: --INI--
! 10: variables_order=CGP
! 11: --FILE--
! 12: <?php
! 13:
! 14: import_request_variables("gpc", "_");
! 15: var_dump($_GET, $_POST, $_COOKIE, $_FILES, $_REQUEST);
! 16:
! 17: echo "Done\n";
! 18: ?>
! 19: --EXPECTF--
! 20: Warning: import_request_variables(): Attempted super-global (_GET) variable overwrite in %s on line %d
! 21:
! 22: Warning: import_request_variables(): Attempted super-global (_POST) variable overwrite in %s on line %d
! 23:
! 24: Warning: import_request_variables(): Attempted super-global (_COOKIE) variable overwrite in %s on line %d
! 25:
! 26: Warning: import_request_variables(): Attempted super-global (_FILES) variable overwrite in %s on line %d
! 27:
! 28: Warning: import_request_variables(): Attempted super-global (_REQUEST) variable overwrite in %s on line %d
! 29:
! 30: Warning: import_request_variables(): Attempted super-global (_GET) variable overwrite in %s on line %d
! 31:
! 32: Warning: import_request_variables(): Attempted super-global (_POST) variable overwrite in %s on line %d
! 33:
! 34: Warning: import_request_variables(): Attempted super-global (_COOKIE) variable overwrite in %s on line %d
! 35:
! 36: Warning: import_request_variables(): Attempted super-global (_FILES) variable overwrite in %s on line %d
! 37:
! 38: Warning: import_request_variables(): Attempted super-global (_REQUEST) variable overwrite in %s on line %d
! 39:
! 40: Warning: import_request_variables(): Attempted super-global (_GET) variable overwrite in %s on line %d
! 41:
! 42: Warning: import_request_variables(): Attempted super-global (_POST) variable overwrite in %s on line %d
! 43:
! 44: Warning: import_request_variables(): Attempted super-global (_COOKIE) variable overwrite in %s on line %d
! 45:
! 46: Warning: import_request_variables(): Attempted super-global (_FILES) variable overwrite in %s on line %d
! 47:
! 48: Warning: import_request_variables(): Attempted super-global (_REQUEST) variable overwrite in %s on line %d
! 49: array(5) {
! 50: ["GET"]=>
! 51: string(1) "0"
! 52: ["POST"]=>
! 53: string(1) "1"
! 54: ["COOKIE"]=>
! 55: string(1) "2"
! 56: ["FILES"]=>
! 57: string(1) "3"
! 58: ["REQUEST"]=>
! 59: string(1) "4"
! 60: }
! 61: array(5) {
! 62: ["GET"]=>
! 63: string(1) "5"
! 64: ["POST"]=>
! 65: string(1) "6"
! 66: ["COOKIE"]=>
! 67: string(1) "7"
! 68: ["FILES"]=>
! 69: string(1) "8"
! 70: ["REQUEST"]=>
! 71: string(1) "9"
! 72: }
! 73: array(5) {
! 74: ["GET"]=>
! 75: string(2) "10"
! 76: ["POST"]=>
! 77: string(2) "11"
! 78: ["COOKIE"]=>
! 79: string(2) "12"
! 80: ["FILES"]=>
! 81: string(2) "13"
! 82: ["REQUEST"]=>
! 83: string(2) "14"
! 84: }
! 85: array(0) {
! 86: }
! 87: array(5) {
! 88: ["GET"]=>
! 89: string(1) "5"
! 90: ["POST"]=>
! 91: string(1) "6"
! 92: ["COOKIE"]=>
! 93: string(1) "7"
! 94: ["FILES"]=>
! 95: string(1) "8"
! 96: ["REQUEST"]=>
! 97: string(1) "9"
! 98: }
! 99: Done
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>