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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
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

Pull Requests

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-2025 The PHP Group
All rights reserved.
Last updated: Thu Jul 03 00:01:35 2025 UTC