Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:124325 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 8715D1A00B7 for ; Tue, 9 Jul 2024 23:39:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1720568471; bh=8z4vYRuVPaTii6LmXTN0NV4bX59iOWdCwfBuAxwmo2Y=; h=Date:To:From:Cc:Subject:In-Reply-To:References:From; b=D+Fnmq7Lr+c5LklyyAkx6SXcoJDJnGooLBi7llDa8c1vkmOBD2Pfnq7PZ/3zBo85I 6noY99aGE0E+QUlIkSeZTeQfbWiDl+XfVoianV1tsQ7/3tOsFeVn03GEWLDPFlmcqz eRj1KL85Ga+5mzKruG8unGqs5WoON3W991+bR+jPv1US9xAFPjkph/c5gv8pKY3zMI qsmaijImhMPpSHcEzJZu5y0XqBjtjskmH7/aaGslXJEuclQUj9hUKvobsSODlBJqg4 NHPRfrl6eEL6ihsMWciNjY6rUDdp2vS72Hkua7Jf2oOuRJTsSBNN4L7QJVj0ne6naz +sJhwDqVcKpwQ== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id E1E9F180618 for ; Tue, 9 Jul 2024 23:41:09 +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,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS, TO_EQ_FM_DIRECT_MX autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: Received: from mail-4022.proton.ch (mail-4022.proton.ch [185.70.40.22]) (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 ; Tue, 9 Jul 2024 23:41:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gpb.moe; s=protonmail2; t=1720568382; x=1720827582; bh=8z4vYRuVPaTii6LmXTN0NV4bX59iOWdCwfBuAxwmo2Y=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=VexmHvKlxt7DcNdweC52aP9WnTsz93cuaelmv7/0jYvPFAEBicJIg0gLBgl0Sq1YO NEgvgERfiPZ3GjWpoKWVLsFG9lkCmGtjmA/mGOcDf1jTkckKw3GFaM2xUjqdEK3KIQ nzbqaFKq/BnWu53jGErQmQ8yE9zPpbqPhYj94ttydLyGTa2QiGQFe3JhJY5wy6yv5B LAL8AjfNIsK/PigR0zMeg9zMT/iUqqqbFOmBDW550cQ1yj6KBYD9boD9i8X7SaHqua BPSOhdfpRa5kCmjZn0azQhj55hlicAKq4b76Sy3Yod4M4ygTrYiRCQtvMSrJzE3/hD B9Nretm2kZiww== Date: Tue, 09 Jul 2024 23:39:37 +0000 To: "Gina P. Banyard" Cc: PHP internals Subject: Re: [PHP-DEV] [RFC] Improve language coherence for the behaviour of offsets and containers Message-ID: In-Reply-To: References: Feedback-ID: 96993444:user:proton X-Pm-Message-ID: b7c146e808132b49c0bd5aac58674ca377222e27 Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable From: internals@gpb.moe ("Gina P. Banyard") On Thursday, 4 July 2024 at 14:52, Gina P. Banyard wrot= e: > Hello internals, >=20 > I would like to formally open the discussion on an RFC I've been working = on for the past year: > https://wiki.php.net/rfc/container-offset-behaviour >=20 > As DokuWiki is a bit of a faff at times, the Markdown sources are availab= le on GitHub: > https://github.com/Girgias/php-rfcs/blob/master/container-offset-behaviou= r.md I have more or less finalized the implementation of the object handler part= . The JIT works, and my minimal opcache changes seem to not make everything c= rash. I have added one tiny subsection to the RFC about the removal of the zend_c= lass_arrayaccess_funcs struct: https://wiki.php.net/rfc/container-offset-behaviour#removal_of_the_zend_cla= ss_arrayaccess_funcs_struct_and_ce_pointer One related issue that I found while working on this RFC is related to ext/= phar: https://github.com/php/php-src/pull/14503 A PharFileInfo extends SplFileInfo and supports directories, which SplFileI= nfo does not. But Phar also allows the user to set the file info class via the setInfoCla= ss() method. This method takes any SplFileInfo based class, such as SplFileObject. Thus, there is currently a bug in the extension where isset() will return t= rue about being able to access a string offset that points to a directory b= ut SplFileObject will throw a LogicException that it cannot be used with a = directory. There are two-way to fix this issue, in my PR I went with the solution to r= eturn false for the has_dimension handler on directories if the info class = is not based on PharFileInfo, or we could remove support for setting info classes that are not based on P= harFileInfo. Let me know what you prefer, as my current implementation is based on the a= bove PR to fix the Phar behavioural changes. Moreover, I know the traffic on the list has been pretty high, but I do int= end to have this RFC up for voting for inclusion in PHP 8.4, and I'm not ex= actly sure how I am meant to interpret the lack of responses. Best regards, Gina P. Banyard