Description
The following code:
php -a <<- 'EOF'
echo 'start' . PHP_EOL;
var_dump(fopen('php://stdout', 'w'));
echo 'end' . PHP_EOL;
EOF
Resulted in this output:
start
resource(2) of type (stream)
But I expected this output instead:
start
resource(2) of type (stream)
end
This will produce output that meets expectations
php -r "echo('start'.PHP_EOL);var_dump(fopen('php://stdout','w'));echo('end'.PHP_EOL);"
but use php -a
will accidentally exiting
Tested environment
- OS: Windows 10
- PHP: 8.1.26 NTS x64
- Docker: NO
- Shell: Bash
PHP Version
PHP: 8.1.26 NTS x64
Operating System
Windows 10