|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2008-06-19 07:55 UTC] anthony dot levensalor at gmail dot com
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Nov 22 01:00:02 2025 UTC |
Description: ------------ Steps to Reproduce: 1. Browse to script on localhost in Apache 2.2 using [PHP 6.0.0-dev (built: Jun 19 2008 02:05:40)] 2. open command window 3. Using PHP 5.2.6 (cli) (built: May 2 2008 18:02:07) "php -l template.php" 4. Note no syntax errors found 5. Using [PHP 6.0.0-dev (cli) (built: Jun 19 2008 02:05:40)] "php -l template.php" 6. Note 'Unexpected $end at line 41...' (1 more than actual line count of 40 lines) Expected result: No parse error in valid syntax. Reproduce code: --------------- <?php @session_start(); require_once("../inc/ddibase.inc.php"); ?> <?php require_once("header.php"); ?> <div id="page"> <?php sessionStatus(); ?> <?php if (function_exists("submenu")) { ?> <div id="submenu"> <?php submenu(); ?> </div> <? } ?> <div id="content"> <div style="margin-bottom: 20px;"> <?php if (function_exists("main")) { main(); } ?> </div> <div> </div> </div> <!-- end content --> <?php if (function_exists("sidebar")) { ?> <div id="sidebar"> <?php sidebar(); ?> </div> <?php } ?> <!-- end sidebar --> <div style="clear: both;"> </div> </div> <!-- end page --> <?php require_once("footer.php"); ?> </body> </html> <?php /* The following is the layout for the content to be written by the main function <div style="margin-bottom: 20px;"> <h1 class="title">Page Title</h1> <p>Page Content</p> </div> */ ?> Expected result: ---------------- Expected same result from 5.2.6 and 6.0.0-Dev parser given valid PHP syntax. Actual result: -------------- /* Command line interop follows */ # php -l template.php No syntax errors detected in template.php # php -v PHP 5.2.6 (cli) (built: May 2 2008 18:02:07) Copyright (c) 1997-2008 The PHP Group Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies # c:\php6\php.exe -l template.php PHP Parse error: syntax error, unexpected $end in template.php on line 40 Parse error: syntax error, unexpected $end in template.php on line 40 Errors parsing template.php # c:\php6\php -v PHP 6.0.0-dev (cli) (built: Jun 19 2008 02:05:40) Copyright (c) 1997-2008 The PHP Group Zend Engine v3.0.0-dev, Copyright (c) 1998-2008 Zend Technologies