<?php
function foo(): array {
return [1, 2, 3, 4];
}
list($var1, $var2...) = foo();
var_dump($var1, $var2, $var3, $var4);
- Output for 7.0.0 - 7.0.2
- Parse error: syntax error, unexpected '...' (T_ELLIPSIS), expecting :: (T_PAAMAYIM_NEKUDOTAYIM) in /in/AKSth on line 7
Process exited with code 255. - Output for 5.5.24 - 5.5.31, 5.6.8 - 5.6.17
- Parse error: syntax error, unexpected ':', expecting '{' in /in/AKSth on line 3
Process exited with code 255.
preferences:
167.63 ms | 1395 KiB | 28 Q