mirror of
https://github.com/php/php-src.git
synced 2026-04-21 06:51:18 +02:00
If multiple unpacks were used (or mixed with normal arguments) parts of the arguments could land on different stack pages. If this occurs the arguments will now be copied to a new stack page. The code used to do this is copied verbatim from the PHP 5.4 branch and only modified to reduce the amount of inlined code.
16 lines
206 B
PHP
16 lines
206 B
PHP
--TEST--
|
|
Argument unpacking with many arguments
|
|
--FILE--
|
|
<?php
|
|
|
|
function fn(...$args) {
|
|
var_dump(count($args));
|
|
}
|
|
|
|
$array = array_fill(0, 10000, 42);
|
|
fn(...$array, ...$array);
|
|
|
|
?>
|
|
--EXPECT--
|
|
int(20000)
|