php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #27613 can'y use equal in a string
Submitted: 2004-03-16 04:45 UTC Modified: 2004-03-16 10:19 UTC
From: patrick dot bast at aquitaine dot iufm dot fr Assigned:
Status: Closed Package: PHP-GTK related
PHP Version: Irrelevant OS: Microsoft Windows 2000
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 !
Your email address:
MUST BE VALID
Solve the problem:
25 + 7 = ?
Subscribe to this entry?

 
 [2004-03-16 04:45 UTC] patrick dot bast at aquitaine dot iufm dot fr
Description:
------------
In my code, the line 72 is :

$pos = strpos($line, '=');

return  :

Parse error: parse error, unexpected '=' in C:\php-gtk\test04.php on line 72

Try to enclose = by "", same result.

Reproduce code:
---------------
function returnvalue($line)
{
	$line = trim($line);
	$pos = strpos($line, "=");
	$value = substr($line, $pos + 1);

return $value;
}


Expected result:
----------------
Will return the correct position of the equal caracter in my string

Actual result:
--------------
Parse error: parse error, unexpected '=' in c:\php-gtk\virusscan\virusscan.php on line 72


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-03-16 10:19 UTC] patrick dot bast at aquitaine dot iufm dot fr
Error in script
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Wed Aug 21 02:01:27 2019 UTC