mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
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
24 lines
323 B
PHP
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===
|