I was talking to a friend tonight about a particular flavor of syntax error in another language. It reminded me of the below behavior in PHP. I know there's a name for this technique/syntax/idiom, but I have no idea what that name is. Anyone?
$ php -a
Interactive shell
php > echo new DateTime()->format('Ymd');
PHP Parse error: syntax error, unexpected '->' (T_OBJECT_OPERATOR), expecting ',' or ';' in php shell code on line 1
Parse error: syntax error, unexpected '->' (T_OBJECT_OPERATOR), expecting ',' or ';' in php shell code on line 1