A short and simple question which I couldn't really find an answer for.
In procedural PHP I could echo a date
echo date('Y-m-d'); ?>
In Object oriented PHP I have to use two lines
$now = new DateTime();
echo $now->format('Y-m-d');
Is it possible to do this in one line?