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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: jordi at mistajj dot nl
New email:
PHP Version: OS:

 

 [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

Pull Requests

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: Mon Dec 30 18:01:27 2024 UTC