#28118 [Opn->Bgs]: 'INT' constant produces parse error
| From: | helly@php.net | Date: | Fri, 23 Apr 2004 07:31:58 +0000 |
| Subject: | #28118 [Opn->Bgs]: 'INT' constant produces parse error | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-58623@lists.php.net to get a copy of this message | ||
ID: 28118
Updated by: helly@php.net
Reported By: foospam at wp dot pl
-Status: Open
+Status: Bogus
Bug Type: Compile Failure
Operating System: Debian GNU/Linux
PHP Version: 4.3.4
New Comment:
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php
int is a reserverd keyword (in the docs you'll find a list of all
reserved keywords)
Previous Comments:
------------------------------------------------------------------------
[2004-04-23 09:07:00] foospam at wp dot pl
Description:
------------
seems, that "INT" string is some keyword for parser.
Reproduce code:
---------------
define('INT', 2);
$types = array(1 * INT);
foreach($types as $type) {
echo $type . "<br />\n";
}
echo "<hr />\n";
$types = array(INT);
foreach($types as $type) {
echo $type . "<br />\n";
}
Expected result:
----------------
2<br />
<hr />
2<br />
Actual result:
--------------
Parse error: parse error, expecting `'('' in X on line 7.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=28118&edit=1