|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #67776 Constant Expressions Syntax
Submitted: 2014-08-05 16:59 UTC Modified: 2016-11-11 21:52 UTC
From: Assigned: nikic (profile)
Status: Closed Package: PHP Language Specification
PHP Version: master OS:
Private report: No CVE-ID: None
 [2014-08-05 16:59 UTC]

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.)


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2015-06-28 21:40 UTC]
-PHP Version: Irrelevant +PHP Version: master
 [2016-11-11 21:52 UTC]
-Status: Open +Status: Closed -Assigned To: +Assigned To: nikic
 [2016-11-11 21:52 UTC]
The constraints now specify which syntactic elements are allowed inside constant expressions.
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Sun Dec 10 22:01:27 2023 UTC