Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:109060 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 52436 invoked from network); 16 Mar 2020 16:08:45 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 16 Mar 2020 16:08:45 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 152471804F6 for ; Mon, 16 Mar 2020 07:31:10 -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=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HTML_MESSAGE, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,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-io1-f41.google.com (mail-io1-f41.google.com [209.85.166.41]) (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 ; Mon, 16 Mar 2020 07:31:09 -0700 (PDT) Received: by mail-io1-f41.google.com with SMTP id m25so17318207ioo.8 for ; Mon, 16 Mar 2020 07:31:09 -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=+wC26isRmYlAXvm0qmyO5AjDkcQQMUiIqO1TuZHMtpY=; b=k8OcrTLt4bJgEwafzZG1ZJ/k9F1iH/Dgo3Q8iXI8MNmXyUnxR5wX6Irdh/lVmyU1BC 3JNArCJ28+qGw1CzTYeFhy4Jq9tl5Pm5a5Lo3SIGoUPLvOZpAeVF2nV3WOeYaPMs5JtQ 9V5X/qfgDHnzBOav5/HhXIuz7yNYpSffuwHYBvdBDSvZBTvGvHpDXsbdjboiuV1OjdKr EijproY9R5XdKCJt/xhOj6zvleLbBcBpgkGorKGUlyP+dpj3PQhpjGG6xLUPjccRRSA/ Pfki9TlBhcNNqAnfwvjq7OudQyzpV52uAAGfEr6tZzBJ363JTPCeFJe35R7JAlyxemmA wPtw== 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=+wC26isRmYlAXvm0qmyO5AjDkcQQMUiIqO1TuZHMtpY=; b=LWKHs/8sHAImV+3u5Ej/GHP8iG2zTfPqpPtuObM/0TmKETksWZ9pO/7wfjxrq9L0wI bumYD5UCav1ysvZcwU0XN/tTuSFVITdHXF0oXoveCK8YlYlEQQZLVAQuoLNil4BB4qgI HY+3B4xUUDkdnHCkRsKtMxxp01Z60Hu1udtMsj8ABWBItXFdWqBxapN4PdG1z4JNL4nm hyHFvD1aa+QwS0IMw9BgLVS1He0SAFkqrfkvhrydP9qgDvnUwxtuqfTzgJ72tu0qHAYc +HOnASVFJNGjZzlKpETh0Es9KLu0M8ON79YvrvTKKfy/g/skGwyYM8fMKkmeMcY8vD2O Nbcg== X-Gm-Message-State: ANhLgQ08dpcH0hFh1QS63vR71JnKinmzhWHunYJTRTVgFsu+Kjh+GvxW pYLiTtP6crP2my9KpG1mp0voy3e1Hq5j05Ehvz/wYpxh90MCjQ== X-Google-Smtp-Source: ADFU+vtbTQG8Ux4p2b/QUq9fpt5u+4muyXd2PM9tTKHmo+PUHRkBaf9LlF4Xn7WQCDL1FC3ZIegK67pnw7S0Hj9v1rY= X-Received: by 2002:a6b:c8d4:: with SMTP id y203mr24347978iof.111.1584369066659; Mon, 16 Mar 2020 07:31:06 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Mon, 16 Mar 2020 15:30:54 +0100 Message-ID: To: Jakob Givoni Cc: php internals Content-Type: multipart/alternative; boundary="00000000000069536705a0f9ab87" Subject: Re: [PHP-DEV] [RFC] [DISCUSSION] Compact Object Property Assignment From: ocramius@gmail.com (Marco Pivetta) --00000000000069536705a0f9ab87 Content-Type: text/plain; charset="UTF-8" Hey Jakob, What happens if you have an expression that throws? class Foo { public $a; public $b; public $c; } $instance = new Foo(); function iThrow() { throw new \Exception(); } try { $foo ->[ a = 'a', b = iThrow(), c = 'c', ]; } catch (\Throwable $e) { var_export($foo); // ??? } What will the state of `$foo` be here? Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On Mon, Mar 16, 2020 at 12:48 PM Jakob Givoni wrote: > Hello Internals, > > I'm opening up my new RFC for discussion: > > https://wiki.php.net/rfc/compact-object-property-assignment > - A pragmatic approach to object literals > > Let me know what you think! > > Best, > Jakob > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > --00000000000069536705a0f9ab87--