From:             anthony dot levensalor at gmail dot com
Operating system: Windows Vista Business
PHP version:      6CVS-2008-06-19 (snap)
PHP Bug Type:     Scripting Engine problem
Bug description:  Unexpected $end in script that runs normally in 5.2.6

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>&nbsp;</div>               
        </div>
        <!-- end content -->
        <?php if (function_exists("sidebar")) { ?>
        <div id="sidebar">
                <?php sidebar(); ?>
        </div>
        <?php } ?>
        <!-- end sidebar -->
        <div style="clear: both;">&nbsp;</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


-- 
Edit bug report at http://bugs.php.net/?id=45310&edit=1
-- 
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=45310&r=trysnapshot52
Try a CVS snapshot (PHP 5.3): 
http://bugs.php.net/fix.php?id=45310&r=trysnapshot53
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=45310&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=45310&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=45310&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=45310&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=45310&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=45310&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=45310&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=45310&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=45310&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=45310&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=45310&r=globals
PHP 4 support discontinued:   http://bugs.php.net/fix.php?id=45310&r=php4
Daylight Savings:             http://bugs.php.net/fix.php?id=45310&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=45310&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=45310&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=45310&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=45310&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=45310&r=mysqlcfg

  • #45310 [NEW]: Unexpected $end in s... anthony dot levensalor at gmail dot com

Reply via email to