summaryrefslogtreecommitdiff
path: root/Zend/tests/bug78356.phpt
blob: 3c24f0a3e96137b8df6aa058685a6d0aa8bccb80 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
--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)