Edit report at https://bugs.php.net/bug.php?id=80936&edit=1
ID: 80936
Updated by: cmb@php.net
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:
I cannot reproduce, neither with JIT enabled nor disabled.
Previous Comments:
------------------------------------------------------------------------
[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