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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
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: Sat Dec 21 13:01:31 2024 UTC