- Output for 7.0.0 - 7.0.20, 7.1.0 - 7.1.7
- Parse error: syntax error, unexpected '->' (T_OBJECT_OPERATOR), expecting ']' in /in/DhCaR on line 5
Process exited with code 255.
<?php
$d = [
new DateTimeImmutable(),
new DateTimeImmutable()->modify('next day'),
new DateTimeImmutable()->modify(),
];
var_dump({...$d}->date);