Bug #66822 [Asn->Csd]: Cannot use T_POW in const expression...

From: Date: Fri, 07 Mar 2014 07:09:58 +0000
Subject: Bug #66822 [Asn->Csd]: Cannot use T_POW in const expression...
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-184591@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=66822&edit=1 ID: 66822 Updated by: bwoebi@php.net Reported by: david at orlandophp dot org Summary: Cannot use T_POW in const expression... -Status: Assigned +Status: Closed Type: Bug Package: *General Issues Operating System: Mac OS X 10.9.2 PHP Version: 5.6.0alpha2 Assigned To: datibbaw Block user comment: N Private report: N New Comment: The fix for this bug has been committed. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. For Windows: http://windows.php.net/snapshots/ Thank you for the report, and for helping us make PHP better. Previous Comments: ------------------------------------------------------------------------ [2014-03-05 05:16:32] david at orlandophp dot org Description: ------------ Expected: Defining a constant with the const keyword and an expression that contains the T_POW (**) operator, the constant should be set to the value of the expression. Actual: Using the T_POW operator in a const statement produces a Parse Error with message: "Parse error: syntax error, unexpected '**' (T_POW)" Test script: --------------- <?php const MOLE = 2 ** 27; echo MOLE; Expected result: ---------------- 134217728 Actual result: -------------- Parse error: syntax error, unexpected '**' (T_POW) in example.php on line 2 ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=66822&edit=1

« previous php.bugs (#184591) next »