Bug #67776 [Opn->Csd]: Constant Expressions Syntax

[email protected] Fri, 11 Nov 2016 21:52:19 GMT
Newsgroups php.standards
Message-ID <[email protected]>
Edit report at https://bugs.php.net/bug.php?id=67776&edit=1

 ID:                 67776
 Updated by:         [email protected]
 Reported by:        [email protected]
 Summary:            Constant Expressions Syntax
-Status:             Open
+Status:             Closed
 Type:               Bug
 Package:            PHP Language Specification
 PHP Version:        master
-Assigned To:        
+Assigned To:        nikic
 Block user comment: N
 Private report:     N

 New Comment:

The constraints now specify which syntactic elements are allowed inside constant expressions.


Previous Comments:
------------------------------------------------------------------------
[2014-08-05 16:59:24] [email protected]

Description:
------------
https://github.com/php/php-langspec/blob/master/spec/10-expressions.md#constant-expressions

The syntax rules for this look wrong. It appears that constant-expression can produce any expression which is too broad; constant-expression is only suppose to be able to produce restricted expressions that can be used for default value initializer or a property initializer. 

(However, it is believed by some that the Constraints sufficiently limit the syntax to what is being suggested. So this may not be an issue.)



------------------------------------------------------------------------



--
Edit this bug report at https://bugs.php.net/bug.php?id=67776&edit=1