php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #43520 unexpected T_ENCAPSED_AND_WHITESPACE
Submitted: 2007-12-06 16:06 UTC Modified: 2007-12-14 01:00 UTC
Votes:8
Avg. Score:4.5 ± 0.9
Reproduced:5 of 7 (71.4%)
Same Version:2 (40.0%)
Same OS:1 (20.0%)
From: jordi at mistajj dot nl Assigned:
Status: No Feedback Package: Compile Failure
PHP Version: 5.2.5 OS: Windows Vista
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
1 + 16 = ?
Subscribe to this entry?

 
 [2007-12-06 16:06 UTC] jordi at mistajj dot nl
Description:
------------
I get the following error when running my script:

Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING

The line of code causing the error is:
if ( isset($_POST['formsubmit']) )

Even when I comments it, I get the error.

Reproduce code:
---------------
if ( isset($_POST['formsubmit']) )
{
    // Code block
}

Error on the first line.



// if ( isset($_POST['formsubmit']) )
if ( true )
{
    // Code block
}

Error on the first (commented!) line.

Expected result:
----------------
Execute the code block inside the if statement.

Actual result:
--------------
The following error:

Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-12-06 22:24 UTC] derick@php.net
Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at
http://bugs.php.net/how-to-report.php

If you can provide more information, feel free to add it
to this bug and change the status back to "Open".

Thank you for your interest in PHP.

 [2007-12-14 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Feb 25 04:01:28 2024 UTC