php-src/Zend/tests/bug78356.phpt
Máté Kocsis 75a678a7e3
Declare tentative return types for Zend (#7251)
Co-authored-by: Nikita Popov <nikita.ppv@gmail.com>
2021-07-19 13:44:20 +02:00

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)