]> granicus.if.org Git - php/commitdiff
Use "Standard input code" instead of "php://stdin"
authorAndrea Faulds <ajf@ajf.me>
Sun, 20 Mar 2016 22:07:14 +0000 (22:07 +0000)
committerJoe Watkins <krakjoe@php.net>
Sat, 12 Nov 2016 17:26:20 +0000 (17:26 +0000)
main/main.c
sapi/cgi/cgi_main.c
sapi/cgi/tests/007.phpt
sapi/cli/php_cli.c
sapi/cli/tests/015.phpt

index 703aa6926345aeccd17640003ac3462881071b6b..b9e4a1083e86b363683ac42fb4c071a3650ec7af 100644 (file)
@@ -2483,7 +2483,7 @@ PHPAPI int php_execute_script(zend_file_handle *primary_file)
                 *   otherwise it will get opened and added to the included_files list in zend_execute_scripts
                 */
                if (primary_file->filename &&
-                   strcmp("php://stdin", primary_file->filename) &&
+                   strcmp("Standard input code", primary_file->filename) &&
                        primary_file->opened_path == NULL &&
                        primary_file->type != ZEND_HANDLE_FILENAME
                ) {
index bf33dc109bcb8414b1948c366185c15fa47cb8b8..7ded894f178a01611900746668b1654797320d82 100644 (file)
@@ -2431,7 +2431,7 @@ consult the installation file that came with this distribution, or visit \n\
                                file_handle.filename = SG(request_info).path_translated;
                                file_handle.handle.fp = NULL;
                        } else {
-                               file_handle.filename = "php://stdin";
+                               file_handle.filename = "Standard input code";
                                file_handle.type = ZEND_HANDLE_FP;
                                file_handle.handle.fp = stdin;
                        }
index ed83db0cf3f48e00087153859309517d59230fb7..841137a0465f8800dc8f98824afcfce1f54887d0 100644 (file)
@@ -17,6 +17,6 @@ var_dump(`"$php" -n -s -w -l`);
 --EXPECTF--    
 string(25) "No input file specified.
 "
-string(41) "No syntax errors detected in php://stdin
+string(49) "No syntax errors detected in Standard input code
 "
 ===DONE===
index 28a5a7c108f3be2ba72a5bdb239f432efdebf2b6..65a0a6350567d3651d2c2952c9d911856db987e8 100644 (file)
@@ -945,7 +945,7 @@ static int do_cli(int argc, char **argv) /* {{{ */
                        /* here but this would make things only more complicated. And it */
                        /* is consitent with the way -R works where the stdin file handle*/
                        /* is also accessible. */
-                       file_handle.filename = "php://stdin";
+                       file_handle.filename = "Standard input code";
                        file_handle.handle.fp = stdin;
                }
                file_handle.type = ZEND_HANDLE_FP;
@@ -984,7 +984,7 @@ static int do_cli(int argc, char **argv) /* {{{ */
                PG(during_request_startup) = 0;
                switch (behavior) {
                case PHP_MODE_STANDARD:
-                       if (strcmp(file_handle.filename, "php://stdin")) {
+                       if (strcmp(file_handle.filename, "Standard input code")) {
                                cli_register_file_handles();
                        }
 
index da2b64617de32cde518e526284b13c5d8975d1a8..62a007b6e415b10e70689447b49058c1e22dbc3e 100644 (file)
@@ -24,7 +24,7 @@ echo "Done\n";
 PHP %d.%d.%d%s(cli) (built: %s)%s
 Array
 (
-    [0] => php://stdin
+    [0] => Standard input code
     [1] => foo
     [2] => bar
     [3] => baz