1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00
Files
archived-php-src/ext/opcache/tests/gh21227.phpt
Ilija Tovilo 1931472f22 Fix borked SCCP of array containing partial object
In SCCP, arrays containing partial objects must be marked as partial so that
their values are not accidentally propagated.

Fixes GH-21227
Closes GH-21232
2026-02-17 18:11:28 +01:00

24 lines
323 B
PHP

--TEST--
GH-21227: Borked SCCP of array containing partial object
--CREDITS--
Daniel Chong (chongwick)
--EXTENSIONS--
opcache
--INI--
opcache.enable=1
opcache.enable_cli=1
--FILE--
<?php
function test() {
$obj->a = 3;
$objs = [];
$obj = new stdClass;
$objs[] = $obj;
}
?>
===DONE===
--EXPECT--
===DONE===