xref: /PHP-7.4/Zend/tests/bug78356.phpt (revision bab8b3a8)
1--TEST--
2Bug #78356: Array returned from ArrayAccess is incorrectly unpacked as argument
3--FILE--
4<?php
5$object = new class implements ArrayAccess {
6    public function offsetGet($offset)
7    {
8        return [1, 2];
9    }
10    public function offsetExists($offset)
11    {
12        return true;
13    }
14    public function offsetUnset($offset) {}
15    public function offsetSet($offset, $value) {}
16};
17var_dump(max(...$object[0]));
18?>
19--EXPECT--
20int(2)
21