Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:116159 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 40488 invoked from network); 25 Sep 2021 15:06:25 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 25 Sep 2021 15:06:25 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 45CAE1804BD for ; Sat, 25 Sep 2021 08:48:21 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=0.2 required=5.0 tests=BAYES_40,DKIM_INVALID, DKIM_SIGNED,FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS15169 209.85.128.0/17 X-Spam-Virus: No X-Envelope-From: Received: from mail-oo1-f50.google.com (mail-oo1-f50.google.com [209.85.161.50]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Sat, 25 Sep 2021 08:48:20 -0700 (PDT) Received: by mail-oo1-f50.google.com with SMTP id m14-20020a4ad50e000000b002912a944a47so4328676oos.12 for ; Sat, 25 Sep 2021 08:48:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=P+2mgg8GlspTRjU427fZDPPnD5TTuEHquep5c+5/CPQ=; b=XVC6KRWdZiAHmviSkuaIpsSVT5HsBMo5rMSFmkGJHkZWWd13Aqf3NU1EFu4XdW5vH0 zMSRUW9kdx9Ez4opLlsW+afYph9rcdDl4FNLwGDgSSaWRsPjacoPm+oTK5ShXs4h3Egi ZYwrTR2XL9hCWgy4GTN2DkuQSvCjnlbXXzW21kSJrZzeCshjqBBK38nz1e+nP31x6iin 78/vN2GKgqYs/oUB3JM2borTOKH5fCr/GMqK39YQmqkpyXR6/HGCW1kPU6LLvp6KtZhJ GgCRj47RpQ9Xpah6P2mVBmuQAJv/lrUsc/6Dva5+77OUp7jr3ot4hZtib7l2X3tpr+pz B7lA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=P+2mgg8GlspTRjU427fZDPPnD5TTuEHquep5c+5/CPQ=; b=oJnExWUpGVseVLhwDfDo069qiC8nfWQkVtMbJOm67j0CDorZH3VWwgT0pMqjOOTpct YuZbzJUwAGyepouSlc2OOhK77aQUlJz8CojNg1sXzgSOdnMnSsNEZsURiOZ9uMuZu6JP xatOYe/i8xSwnqNZ418Wis18Lf8uZpA3GYNrROkaJiAuPC1kE02/e0Ww8pruPvcbMNL+ PoK3t7HpYv1mHILlhaaEGSM2FrU2K2HTJhBDGtczrQb5ynLfF5uFitahZ9qasLrFqamW 6E+5iBD1eWQ/fUUrW0iSd3urg+Y1UpMgYwY8H9tBVZe62Q92s+ac7gX9w8gciM7kktC6 ZdRg== X-Gm-Message-State: AOAM532aLDsz2f7tpvooYRtjZZP921EInaaSLdE5ImpVx0zOvPWh59xr ySgX0UvV9uji53hGIsF0sDkjftgIy7TAJW6z30bJYiYOq3o= X-Google-Smtp-Source: ABdhPJwtmeLj1GaUr9u+xabE15y6xcJMSazo4qQBXL2NGEDh0nRbg41K8Bkgie/c7Mt9xkZJzRQvK59Yhoewc7S45xE= X-Received: by 2002:a4a:db68:: with SMTP id o8mr13569794ood.98.1632584900119; Sat, 25 Sep 2021 08:48:20 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Sat, 25 Sep 2021 17:48:08 +0200 Message-ID: To: tyson andre Cc: PHP Internals List Content-Type: multipart/alternative; boundary="00000000000009909305ccd3cb46" Subject: Re: [PHP-DEV] Allowing `(object)['key' => 'value']` in initializers? From: ocramius@gmail.com (Marco Pivetta) --00000000000009909305ccd3cb46 Content-Type: text/plain; charset="UTF-8" Hey Tyson, On Sat, 25 Sep 2021, 17:45 tyson andre, wrote: > What are your thoughts on allowing the `(object)` cast in initializer > types where `new` was already allowed, but only when followed by an array > literal node. (e.g. continue to forbid `(object)SOME_CONSTANT`) (see > https://wiki.php.net/rfc/new_in_initializers) > Right now, there's even an interest in getting rid (or deprecating) dynamic properties on objects: why push the complete opposite ways? What is the actual value of using an stdClass instance instead of an `array` (already supported)? > --00000000000009909305ccd3cb46--