php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #74097 php -l can not detect syntax error in cli
Submitted: 2017-02-15 06:00 UTC Modified: 2017-02-15 07:10 UTC
Votes:1
Avg. Score:1.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: xiaohanqingqing at gmail dot com Assigned:
Status: Not a bug Package: CGI/CLI related
PHP Version: 7.1.1 OS: windows 10
Private report: No CVE-ID: None
 [2017-02-15 06:00 UTC] xiaohanqingqing at gmail dot com
Description:
------------
<?php
if(true (false)) {

}
//save this code as test.php
//run 'php -l test.php' in cli detect no syntax error
//run 'php -f test.php' in cli report syntax error

Test script:
---------------
<?php
if(true (false)) {

}
//save this code as test.php
//run 'php -l test.php' in cli detect no syntax error
//run 'php -f test.php' in cli report syntax error

Expected result:
----------------
detect the syntax error


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2017-02-15 07:10 UTC] laruence@php.net
-Status: Open +Status: Not a bug
 [2017-02-15 07:10 UTC] laruence@php.net
php -f reports call to undefined function true() error, not syntax error
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Apr 24 06:01:29 2024 UTC