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
 [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: Wed Nov 13 08:01:29 2024 UTC