php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #72597 expression in 'new' operator syntax
Submitted: 2016-07-14 13:03 UTC Modified: 2017-09-28 15:54 UTC
From: nikola dot kovacs at gmail dot com Assigned: nikic (profile)
Status: Closed Package: PHP Language Specification
PHP Version: Irrelevant 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: nikola dot kovacs at gmail dot com
New email:
PHP Version: OS:

 

 [2016-07-14 13:03 UTC] nikola dot kovacs at gmail dot com
Description:
------------
In the 'new' operator syntax description (https://github.com/php/php-langspec/blob/master/spec/10-expressions.md#the-new-operator):

object-creation-expression:
    new  class-type-designator

class-type-designator:
    qualified-name
    expression

expression links to https://github.com/php/php-langspec/blob/master/spec/10-expressions.md#general-6, which is:

expression:
    yield-expression
    include-expression
    include-once-expression
    require-expression
    require-once-expression

This is wrong. I think it should be:

class-type-designator:
    qualified-name
    variable-name


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2017-09-28 15:54 UTC] nikic@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: nikic
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 12:01:31 2024 UTC