#50656 [Opn->Bgs]: Assign constant to var causes syntax error
| From: | johannes@php.net | Date: | Mon, 04 Jan 2010 15:15:20 +0000 |
| Subject: | #50656 [Opn->Bgs]: Assign constant to var causes syntax error | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-146320@lists.php.net to get a copy of this message | ||
ID: 50656
Updated by: johannes@php.net
Reported By: willirl at gmail dot com
-Status: Open
+Status: Bogus
Bug Type: Compile Failure
Operating System: mac os x 10.6
PHP Version: 5.3.1
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
Drop the "var" keyword.
Previous Comments:
------------------------------------------------------------------------
[2010-01-04 15:07:07] willirl at gmail dot com
Description:
------------
This error is on Mac 10.6 has PHP 5.3.0 which is not shown in version
selector.
The code causes this error:
Parse error: syntax error, unexpected T_VAR in
/Users/willirl/Desktop/TEST Files/test.php on line 6
Reproduce code:
---------------
<?php
define('A_CONSTANT', 25);
var $abc = A_CONSTANT;
?>
Expected result:
----------------
No error. $abc set to 25.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=50656&edit=1