php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #45147 unexpected T_ENDFOR
Submitted: 2008-06-02 09:16 UTC Modified: 2008-06-27 20:39 UTC
Votes:2
Avg. Score:4.5 ± 0.5
Reproduced:2 of 2 (100.0%)
Same Version:2 (100.0%)
Same OS:0 (0.0%)
From: php at deegital dot de Assigned:
Status: Not a bug Package: Scripting Engine problem
PHP Version: 5.3CVS-2008-06-02 (snap) OS: Vista 32Bit
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: php at deegital dot de
New email:
PHP Version: OS:

 

 [2008-06-02 09:16 UTC] php at deegital dot de
Description:
------------
Tokenizer seems to have problems with some php/html mix constructions (found this in a "compiled" smarty template)

Works, if if, else and endif is splitted into multiple lines

Reproduce code:
---------------
<?php for ($i = 0; $i == 0; $i++): ?>
		<?php if (true): ?>#<?php else: ?>#<?php endif; ?>
<?php endfor; ?>


Expected result:
----------------
#

Actual result:
--------------
Parse error: syntax error, unexpected T_ENDFOR in [foo] on line 3

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-06-27 20:39 UTC] johannes@php.net
Please do not submit the same bug more than once. An existing
bug report already describes this very problem. Even if you feel
that your issue is somewhat different, the resolution is likely
to be the same. 

Thank you for your interest in PHP.

bug #45372 is newer but about the same issues with more discussion. Closing this in favour of the other one.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Nov 21 18:01:29 2024 UTC