Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:126106 X-Original-To: internals@lists.php.net Delivered-To: internals@lists.php.net Received: from php-smtp4.php.net (php-smtp4.php.net [45.112.84.5]) by qa.php.net (Postfix) with ESMTPS id D32BB1A00BD for ; Thu, 5 Dec 2024 17:12:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1733418548; bh=ovhjXPrRXz45EtX2zZBqJ/H9sOMjbk1FzL1toa+3y5c=; h=From:Date:Subject:To:Cc:From; b=NvBfpLwsoDCpeuTNKX1JYe/YkIwuMadrYOlX2HUPoaWyem9tsh2FsxXBofzYXEsMU ocepp6idOmwzkdmLITe3dSjmWAItp+3EGLx3V5KJ1Mf7MTtKXe2Yqt+xoAQuKbsbP4 /Bc/RUwTeIr1FNX+xBtI8t37wCd1qZjqOhEMJ4zKYR1CjiH729lgdhLvN/a44w/Rgm 21ZMghDU8gN8nUTGM5fHBbuJpW4LasCTy5bASEQA+vS9NpwYu7jt9i+ydCaHFrKuWa 0/VG1Vr8pape7MI9yoopfmwJ0E9Td4khu/3Z2puhlGrHxxPPY94f69MkgtWGijRB66 aqpI4xoZlIj+A== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 320FF18006A for ; Thu, 5 Dec 2024 17:09:07 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=0.6 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS,FREEMAIL_FROM, HTML_MESSAGE,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: Received: from mail-ed1-f43.google.com (mail-ed1-f43.google.com [209.85.208.43]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Thu, 5 Dec 2024 17:09:06 +0000 (UTC) Received: by mail-ed1-f43.google.com with SMTP id 4fb4d7f45d1cf-5d3ab136821so465166a12.0 for ; Thu, 05 Dec 2024 09:12:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1733418733; x=1734023533; darn=lists.php.net; h=cc:to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=ovhjXPrRXz45EtX2zZBqJ/H9sOMjbk1FzL1toa+3y5c=; b=KKCiSm75H28Gtc5wYy209TuRfIbEh8/Wm0ERmqHbYVODz5FNwbFVEvlH/mVyo93jHq Vv7rYHWpRz+WC8ez661M7CON5MGkljB6QsMLrYgtJeGpo5w4Q2x9osDevAJBh5vvEYGv B1taJLRbQjcGPr0jdAqCOHZhAvKSfGWaGg4cgX4AW4VOzVjTLaxZsaDHQKPpqMybG6mb 0lumwlLlfEQi6fGOWgID4DXEGvDDBEBFyLaXGEYzeGFGH7S3mZcLzZ5rv61xcac8BRAt sMfeMpsyhyjRgyRgM/H1upkDC4R7CrFk/ErBdwC+AHU35zTnqEii4bn+wYyV30B/QN8A 3dyg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733418733; x=1734023533; h=cc:to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=ovhjXPrRXz45EtX2zZBqJ/H9sOMjbk1FzL1toa+3y5c=; b=LwkBRaqXnRnoIe9YgEScLwss+KRl6JU/d7pQRws4zPyOrsJMcREdE3IPmMOUQ4bCi3 safGBJQEVerX1rciypxnJfkdOR7tNPTn06ObZp6uGdTrEi1j0RfVFY9Rb8qSoxClrxbH 8fL3bT0aNbSDHh+Cv+UsMmBM5BkAkgFO8J8yusiCPy6M1mMZTSKr/1jNKyzXUjEun4QW YVcKN6KFdOu5adqm0JoUH8DKtYMGlgzZIwBpenNsxZ6LAjNT9FlZZt1ABC2VmtrRswqc 5jAGW3w0oyJdHdlyIh1YziaAbLi/KpZuYlRp29xpRu8T+VjEXh4ueuLj4OXqbOWrntZf lk8w== X-Gm-Message-State: AOJu0Yx/Xf8YzKtkQnQoQzzNHJLnkHsDtYJrieP95VYNoYmIfTI9U+F5 uBQA4Thhbb+vGVDBrINi/uH/fY3JyXhceVqwhe+6/QrTUjoxWPYkgTl6jw5sf7E/Zz/O9HTGn76 XjfYaKGBYPV08dMemBXJD097KhxU= X-Gm-Gg: ASbGncsONUfQ9r6cZH3YBQamet5rTH6N3ZKsJaBdWvgqXJWuYjC24nfWzRsDjyFYRHP RjkHOlwyyeeeeqmWZV8aH07NzbxEL5jdf X-Google-Smtp-Source: AGHT+IEB/rU+NXxh+YswDiyTfZg9GpZ5nWYcdQx5y6CJBLm6XG9uoATx0RYcGzTjG/vJVRiIrlACh6oCUha0+5mEJfQ= X-Received: by 2002:a05:6402:27c9:b0:5d0:b925:a8a with SMTP id 4fb4d7f45d1cf-5d10cb5b909mr9908040a12.16.1733418732519; Thu, 05 Dec 2024 09:12:12 -0800 (PST) Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net x-ms-reactions: disallow MIME-Version: 1.0 Date: Thu, 5 Dec 2024 12:12:01 -0500 Message-ID: Subject: [PHP-DEV] PHP RFC: Records - questions To: landers.robert@gmail.com, rob@bottled.codes Cc: internals@lists.php.net Content-Type: multipart/alternative; boundary="000000000000cc8a1c062888ff30" From: volodymyr.volynets@gmail.com (Volodymyr Volynets) --000000000000cc8a1c062888ff30 Content-Type: text/plain; charset="UTF-8" Hi, I have a question in regards to the proposed PHP RFC: Records. For following snippet: record Result(bool $success, array $error, array $data); $result = &Result(false, [], []); $result->with(success: true)->*with(error: $error + ['Some error'])*->*with(data: $data + ['user_id' => 777]))*; Is this possible to append/merge to existing array properties? Like I am doing with error. Regards Volodymyr Volynets --000000000000cc8a1c062888ff30 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi,

I have a question in reg= ards to the proposed PHP RFC: Records. For following snippet:
record Result(bool $success, array $error, array $data);
$re= sult =3D &Result(false, [], []);
$result->with(success: true)->= ;with(error: $error + ['Some error'])->with(data: $dat= a + ['user_id' =3D> 777]));

Is this= possible to append/merge to existing array properties? Like I am doing wit= h error.

Regards
Volodymyr Volynets
=
--000000000000cc8a1c062888ff30--