parent
5f735e2fc0
commit
8be62dafb3
4 changed files with 40 additions and 2 deletions
@ -0,0 +1,18 @@ |
|||||||
|
--TEST-- |
||||||
|
Tuple multi-return fast path can discard trailing values |
||||||
|
--FILE-- |
||||||
|
<?php |
||||||
|
function multi_return_three_values(): array |
||||||
|
{ |
||||||
|
return [1, 2, 3]; |
||||||
|
} |
||||||
|
|
||||||
|
function main(): void |
||||||
|
{ |
||||||
|
[$first, $second] = multi_return_three_values(); |
||||||
|
var_dump($first, $second); |
||||||
|
} |
||||||
|
?> |
||||||
|
--EXPECT-- |
||||||
|
int(1) |
||||||
|
int(2) |
||||||
Loading…
Reference in new issue