Edit report at https://bugs.php.net/bug.php?id=80936&edit=1
ID: 80936
Patch added by: samsanchez@qq.com
Reported by: samsanchez at qq dot com
Summary: php.exe -f test.php doesn't work
Status: Open
Type: Bug
Package: JIT
Operating System: Windows 10
PHP Version: 8.0.3
Block user comment: N
Private report: N
New Comment:
The following patch has been added/updated:
Patch Name: rename_this_file_extension.txt
Revision: 1617719472
URL: https://bugs.php.net/patch-display.php?bug=80936&patch=rename_this_file_extension.txt&revision=1617719472
Previous Comments:
------------------------------------------------------------------------
[2021-04-05 15:29:54] cmb@php.net
I cannot reproduce, neither with JIT enabled nor disabled.
------------------------------------------------------------------------
[2021-04-05 08:51:18] samsanchez at qq dot com
I find the problem is because the encode of test.php is UTF-8 With BOM!
changing the encode to UTF-8 without BOM make it work as expect.
however i think the php cli should raise me an error instead of output the whole source to me.
------------------------------------------------------------------------
[2021-04-05 08:39:44] samsanchez at qq dot com
change the package to JIT
------------------------------------------------------------------------
[2021-04-05 08:33:39] samsanchez at qq dot com
Description:
------------
E:\Develop\php8>php -f test.php
<?php
echo 'hello php8';
Test script:
---------------
<?php
echo 'hello php8';
Expected result:
----------------
hello php8
Actual result:
--------------
<?php
echo 'hello php8';
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=80936&edit=1