[php-src] PR #21480: Fix GH-21478: Forward read_property to real instance for initialized lazy proxies

From: Date: Sat, 21 Mar 2026 02:12:51 +0000
Subject: [php-src] PR #21480: Fix GH-21478: Forward read_property to real instance for initialized lazy proxies
Groups: php.git-pulls 
Request: Send a blank email to git-pulls+get-35283@lists.php.net to get a copy of this message
Pull Request: https://github.com/php/php-src/pull/21480 Author: iliaal ## Summary zend_std_read_property() was calling __get/__isset on an initialized lazy proxy before forwarding to the real instance. This produced double magic method invocations when the real instance's __get accessed the proxy -- the proxy's own guard was clear, so __get fired on the proxy too. For pure reads (BP_VAR_R, BP_VAR_IS), forward directly to the real instance before attempting magic methods on the proxy. Write contexts (BP_VAR_W/RW) are excluded since read_property with those types is a fallback from get_property_ptr_ptr for reference operations. Also updates gh18038-004 and gh18038-007 test expectations to match -- these tests previously asserted the double-call behavior that GH-21478 reports as a bug. Fixes #21478

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