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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
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

Add a Patch

Pull Requests

Add a Pull Request

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-2021 The PHP Group
All rights reserved.
Last updated: Sun Jan 17 04:01:23 2021 UTC