php.net |  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: joelm@php.net Assigned: nikic (profile)
Status: Closed Package: PHP Language Specification
PHP Version: master OS:
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: joelm@php.net
New email:
PHP Version: OS:

 

 [2014-08-05 16:59 UTC] joelm@php.net
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.)


Patches

Pull Requests

History

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