Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:103291 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 33206 invoked from network); 1 Oct 2018 03:22:40 -0000 Received: from unknown (HELO mail-io1-f44.google.com) (209.85.166.44) by pb1.pair.com with SMTP; 1 Oct 2018 03:22:40 -0000 Received: by mail-io1-f44.google.com with SMTP id x26-v6so2350172iog.11 for ; Sun, 30 Sep 2018 16:31:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=CRB5e/V2mHC8kwkkB+cqepixtRs8pP6uOQvg19HMOJU=; b=FkdDdToQZ6cNbcbGrzAofmcuhXNxVz96ieAQRqjClW6F+HvB6LY2UwXTWZ/weWR21j dhEmR3lnJakUgogyF0iDv6WuTT92Kq0pgpn7NZFDokAVd27/rjM0h+ldays1mOS8sKP6 Dscop5ApUgIU5RKpkKQruJIjht2ZEwHD5RxszSulMpiZlVH3WPBZ+ua1kLWzb/IRlz+A bJ8y+JGf6fSmv8Mv+M63sOF5+BMApak4kzPYZN05GvyYnRNSC/xQc7bWtJe+vEw12iU9 Z5qo18xADxd+VhtakqEnpG1XZ6hZ4gV6PuwjTZUkoodkQIxa/FBwkoeHsz+EhBhxnLqD fDfg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=CRB5e/V2mHC8kwkkB+cqepixtRs8pP6uOQvg19HMOJU=; b=OKrQrIEw6Qgu13aO37ha5EzcspTLiHhZtDpGFMkiv6ucNabIIQDfc8PcB3l402ifst 3wR2Gjc7wapkcefacfmKTcZVdAtWWYYWopqthLxySYX61QGkwBY8bPkMBL8nnV1MFiI7 Sz5pVS3/oFFLoXkhKV91hzBWvGaE0JOeFxMZcC33nB/HyhLVJFEo2YMLgi2gHjhvxbEK QY62G+ptU6aUfagSisbmbbln5h6nI0fmYofbcRaX1UfAzeuvDL2eWhNTWlpfa/A88JsP QO8gpvgUS4JTcfH1ta+kXq03nI0SK1hc6KFpr1wCxKBLs2h9Osqp9jEqgxhAaAXu3aJx fpqw== X-Gm-Message-State: ABuFfoh4wNtSO6tPxiFgx0SXmVY+j4MorBVN/aweqT0maxKPno/Q4Zqj xfXkrgrvkuggl8lK2bfALdjz4RXRi6nfRhzstmo= X-Google-Smtp-Source: ACcGV60N3UGRH6jvXTqfY0MbEPP4vHDJbUD6AuhLUwqLtJsJh/sTU/V9xS/glMp7BCehK5LhhzUERzmRN6PYNlLhAlE= X-Received: by 2002:a5e:df0d:: with SMTP id f13-v6mr3910819ioq.235.1538350314473; Sun, 30 Sep 2018 16:31:54 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Mon, 1 Oct 2018 01:31:42 +0200 Message-ID: To: marcospassos.com@gmail.com Cc: PHP Internals List Content-Type: multipart/alternative; boundary="00000000000008d1d905771f18f8" Subject: Re: [PHP-DEV] Class name resolution for \array::class From: ocramius@gmail.com (Marco Pivetta) --00000000000008d1d905771f18f8 Content-Type: text/plain; charset="UTF-8" Since `array` is not a class, it doesn't make sense to resolve its type. What's the use-case for such pseudo-constant in your code? Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On Mon, Oct 1, 2018 at 1:30 AM Marcos Passos wrote: > Currently, class name resolution supports all types except an array. > https://3v4l.org/OXFMW > > In fact, it is syntactically invalid since the parser fails to recognize > `array::class` as an array expression: > > Parse error: syntax error, unexpected 'array' (T_ARRAY), expecting > > identifier (T_STRING) > > https://3v4l.org/5IOoI > > > Is possible to change the grammar to support array also? > > - Marcos > --00000000000008d1d905771f18f8--