Bug #74097 [Opn->Nab]: php -l can not detect syntax error in cli

From: Date: Wed, 15 Feb 2017 07:10:40 +0000
Subject: Bug #74097 [Opn->Nab]: php -l can not detect syntax error in cli
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-207384@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=74097&edit=1 ID: 74097 Updated by: laruence@php.net Reported by: xiaohanqingqing at gmail dot com Summary: php -l can not detect syntax error in cli -Status: Open +Status: Not a bug Type: Bug Package: CGI/CLI related Operating System: windows 10 PHP Version: 7.1.1 Block user comment: N Private report: N New Comment: php -f reports call to undefined function true() error, not syntax error Previous Comments: ------------------------------------------------------------------------ [2017-02-15 06:00:26] 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 ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=74097&edit=1

« previous php.bugs (#207384) next »