Annotation of embedaddon/php/ext/standard/tests/general_functions/import_request1.phpt, revision 1.1.1.2

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

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>