mirror of
https://github.com/php/php-src.git
synced 2026-03-24 08:12:21 +01:00
Second pass through `Zend/tests/bug*` to organize the tests. Move tests to existing sub directories, and create some new sub directories: * `ArrayAccess` * `autoload` * `clone` * `serialize` (also covers `unserialize()`) * `switch` Work towards GH-15631
21 lines
471 B
PHP
21 lines
471 B
PHP
--TEST--
|
|
Bug #78356: Array returned from ArrayAccess is incorrectly unpacked as argument
|
|
--FILE--
|
|
<?php
|
|
$object = new class implements ArrayAccess {
|
|
public function offsetGet($offset): mixed
|
|
{
|
|
return [1, 2];
|
|
}
|
|
public function offsetExists($offset): bool
|
|
{
|
|
return true;
|
|
}
|
|
public function offsetUnset($offset): void {}
|
|
public function offsetSet($offset, $value): void {}
|
|
};
|
|
var_dump(max(...$object[0]));
|
|
?>
|
|
--EXPECT--
|
|
int(2)
|