@ 2020-04-19T05:35:56Z <?php
$array = [
'-1' => 'val-1',
0 => 'val0',
'3' => 'val3',
4.5 => 'val4.5',
];
var_export([...$array]);
Enable javascript to submit You have javascript disabled. You will not be able to edit any code.
Output for 8.1.0 - 8.1.33 , 8.2.0 - 8.2.29 , 8.3.0 - 8.3.25 , 8.4.1 - 8.4.12 Deprecated: Implicit conversion from float 4.5 to int loses precision in /in/Ze70K on line 7
array (
0 => 'val-1',
1 => 'val0',
2 => 'val3',
3 => 'val4.5',
) Output for 7.4.0 - 7.4.33 , 8.0.1 - 8.0.30 array (
0 => 'val-1',
1 => 'val0',
2 => 'val3',
3 => 'val4.5',
) Output for 7.2.0 - 7.2.29 , 7.3.0 - 7.3.33 Parse error: syntax error, unexpected '...' (T_ELLIPSIS), expecting ']' in /in/Ze70K on line 10
Process exited with code 255 . preferences:dark mode live preview ace vim emacs key bindings
154.23 ms | 409 KiB | 5 Q