如何制作数组而不是调用date()3次?

$this_year = date('Y');
$days_this_year = 365 + date('L');
$day_number = date('z') + 1;

Can I make an array instead of calling date() 3 times? I tried a few times, but could not figure out the syntax I needed

This approach creates a string with the values separated by spaces and explodes it into an array.

$values = date('Y L z');
$items = explode(' ',$values);
echo 'Year: '.$items[0].PHP_EOL;
echo 'Days this year: '.($items[1]+365).PHP_EOL;
echo 'Day number: '.$items[2].PHP_EOL;

Try this

list($this_year,$days_this_year,$day_number) = preg_split("/[\s]/",date('Y L z'));
echo $this_year . PHP_EOL;
echo ($days_this_year + 365) . PHP_EOL;
echo ($day_number  + 1) . PHP_EOL;

Probably not the most readable, but just for fun, here's a one-liner:

$array = array_map('array_sum', array_map('array_merge', [[0], [365], [1]], json_decode(date('[[Y],[L],[z]]'), true)));