[php-src] Issue #9195: php -F command line option shows the error "Could not open input file:"
| From: | ricardosdl | Date: | Fri, 29 Jul 2022 18:09:29 +0000 |
| Subject: | [php-src] Issue #9195: php -F command line option shows the error "Could not open input file:" | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-242073@lists.php.net to get a copy of this message | ||
Issue: https://github.com/php/php-src/issues/9195
Author: ricardosdl
### Description
Executing php cli like this:
php -i | php -F foo.php
This is the content of foo.php:
```php
<?php
echo $argn, PHP_EOL;
```
Resulted in this output:
```
...
$_SERVER['argc'] => 0
$_ENV['ALLUSERSPROFILE'] => C:\ProgramData
$_ENV['APPDATA'] => C:\Users\ricardo.lima\AppData\Roaming
$_ENV['CG_BOOST_ROOT'] => C:\Program Files (x86)\Embarcadero\RAD
Studio\7.0\include\boost_1_39
Could not open input file: foo.php
```
The output of the command is cut short and the error message is the last thing in the output.
But I expected this output instead:
```
...
PHP License
This program is free software; you can redistribute it and/or modify
it under the terms of the PHP License as published by the PHP Group
and included in the distribution in the file: LICENSE
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
If you did not receive a copy of the PHP license, or have any
questions about PHP licensing, please contact license@php.net.
```
### PHP Version
PHP 8.1.8 (cli) (built: Jul 5 2022 23:10:34) (NTS Visual C++ 2019 x64) Copyright (c) The PHP Group
Zend Engine v4.1.8, Copyright (c) Zend Technologies
### Operating System
Windows 10