php-src/Zend/tests/bug78356.phpt
2019-08-01 10:10:28 +02:00

21 lines
446 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)
{
return [1, 2];
}
public function offsetExists($offset)
{
return true;
}
public function offsetUnset($offset) {}
public function offsetSet($offset, $value) {}
};
var_dump(max(...$object[0]));
?>
--EXPECT--
int(2)