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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: xiaohanqingqing at gmail dot com
New email:
PHP Version: OS:

 

 [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: Fri Apr 26 12:01:30 2024 UTC