Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:124337 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 4EB901A00B7 for ; Wed, 10 Jul 2024 09:28:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1720603781; bh=oZWaeWNJXUN8XNmr8CQVQAmlKV/pdrUR6G2b18OHJnA=; h=Date:From:To:cc:Subject:In-Reply-To:References:From; b=ZkNiDXaQzocVDW1Q+gbYwTIrBSOpv8OqkLs1Mw8O1MK5xKKDEH4Q94knYAUONdY6C sbprD6X6O4g3sUikeFz7RrXyh0i53d4PRZk/ttoYqD1lvGW2M6Gtyijn3Zi1Wkb6Ht 5ZgQehGVFxeR9fRLYgIixLyoK0PnknfQawontCWKVXvTbqtRWq31xv5uo0ihJHZqc3 mXx8Sbt/2am7i4xkA8rWcOzZK27z0bceZg/Z2rq8s+z9YbDYVJMM5tGcT3xN/Edz1k /YO759HGBdfTR/wX/JBrPFdNbT3j/ZcH+CwiOkg4EW1d+o7Bf7+xNDcnUD3ZIbCiwm XT6W532yQ6m7Q== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 14361180051 for ; Wed, 10 Jul 2024 09:29:41 +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=3.6 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS,SPF_HELO_PASS, SPF_SOFTFAIL autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: Received: from xdebug.org (xdebug.org [82.113.146.227]) (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 ; Wed, 10 Jul 2024 09:29:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1720603693; bh=oZWaeWNJXUN8XNmr8CQVQAmlKV/pdrUR6G2b18OHJnA=; h=Date:From:To:cc:Subject:In-Reply-To:References:From; b=mDuRWEuQoySJS3W0HfkAnTwl+5c7UMFt/rFLDnlVi40NI3CODPeYI+yKZ24yaszjV Lo3CiVSOQEtoAXDZKniANBIpGfOrs9dZoh9Ca1A4XxPbpLvGVhUf0cL1SanSTG30dT HVqM5qWJkAYXBxylGoBB/+J70bFTCfn5M2EvDohTl95sWUbejfDvZDYeJP2Y6aYN40 syzbQgCTTVaNhLTjhDLmkdZgE9Y9Xs5mn7yiQJMeQGmzcKzHaq4KjRsP2dgPbq4mYU udKZ1v69iRkpM+gGL0nOZiW7bURQ0VujL7LAbhokrZ6qfDdm8acF0yGaCdvQ6DvK62 5Iu9eDVR45zxw== Received: from localhost (localhost [IPv6:::1]) by xdebug.org (Postfix) with ESMTPS id 6690B10C187; Wed, 10 Jul 2024 10:28:13 +0100 (BST) Date: Wed, 10 Jul 2024 10:28:13 +0100 (BST) To: Claude Pache cc: Larry Garfield , php internals Subject: Re: [PHP-DEV] [RFC] Property Hook improvements In-Reply-To: <8A3C2FDA-60DF-45A1-BA9D-11B6FB6F755C@gmail.com> Message-ID: <80f69fe5-4409-6c8c-5807-de66edf23ceb@php.net> References: <8A3C2FDA-60DF-45A1-BA9D-11B6FB6F755C@gmail.com> Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="8323329-1218124254-1720603693=:3691" From: derick@php.net (Derick Rethans) This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --8323329-1218124254-1720603693=:3691 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: QUOTED-PRINTABLE On Wed, 3 Jul 2024, Claude Pache wrote: > > Le 1 juil. 2024 =C3=A0 19:02, Larry Garfield a= =20 > > =C3=A9crit : > >=20 > > Hi folks. As Ilija's been polishing off hooks to get the PR merged,=20 > > we've run into two small revisions that should make life better for=20 > > all involved. One is a performance improvement that requires a very=20 > > slight error handling behavior change, and the other is enabling=20 > > readonly in selected (but probably all of the relevant)=20 > > circumstances. > >=20 > > I'd say we expect these to be uncontroversial, but this is PHP. :-) =20 > > So I will instead just note that it's a short RFC and open the=20 > > discussion accordingly. > >=20 > > https://wiki.php.net/rfc/hook_improvements >=20 > 1. Removing the guard against recursion is sensible to me, as the sort=20 > of bug it is supposed to prevent is not specific to property=20 > accessors. IMO, a better solution to the issue is to implement a=20 > global upper limit on the call stack size. That is already done in PHP 8.4, if you end up using too much stack, PHP=20 will now bail out graciously:=20 https://github.com/php/php-src/blob/master/Zend/zend_call_stack.c > Currently, I am able to generate a call stack of more than 10 millions=20 > items before an OOM error occurs; PHP should have thrown a stack=20 > overflow error long before that. Why? Most actual function calls are not done on the stack any more. So=20 it is now perfectly okay to have that many nested calls. If you want it=20 to bail out earlier (during testing), then Xdebug will help you. cheers, Derick --=20 https://derickrethans.nl | https://xdebug.org | https://dram.io Author of Xdebug. Like it? Consider supporting me: https://xdebug.org/suppo= rt mastodon: @derickr@phpc.social @xdebug@phpc.social --8323329-1218124254-1720603693=:3691--