In the provided PHP code, what improvements can be made to optimize the usage of array_push and prevent repetitive errors?

The issue with the current code is that it uses array_push multiple times to add elements to the same array, which can be inefficient and prone to errors. To optimize the usage of array_push and prevent repetitive errors, we can directly assign values to the array keys without using array_push.

// Original code with repetitive array_push calls
$items = [];
array_push($items, 'item1');
array_push($items, 'item2');
array_push($items, 'item3');

// Improved code with direct assignment
$items = ['item1', 'item2', 'item3'];