[php-src] PR #20096: Avoid hardcoding the offset for ErrorException specific properties

From: Date: Tue, 07 Oct 2025 16:58:42 +0000
Subject: [php-src] PR #20096: Avoid hardcoding the offset for ErrorException specific properties
Groups: php.git-pulls 
Request: Send a blank email to git-pulls+get-33522@lists.php.net to get a copy of this message
Pull Request: https://github.com/php/php-src/pull/20096 Author: bwoebi While I consider it fine to hardcode offsets for parent-less classes, doing it on inherited classes prohibits adding additional properties via extensions. In this specific case, an added property to Exception will cause "new ErrorException" to crash. _Technically_, it's possible to work around this issue via a fake hooked property, to bypass the offset-access. But that's quite hacky, and it would be much simpler to just not do that type of optimization on properties defined on child classes.

« previous php.git-pulls (#33522) next »