In the given PHP code, what improvements can be made to optimize the process of generating unique text paragraphs?

Issue: The current code generates unique text paragraphs by randomly selecting sentences from an array, which may result in duplicate paragraphs being generated. To optimize the process and ensure truly unique paragraphs, we can shuffle the array of sentences before selecting them. Improved PHP code:

<?php

// Array of sentences
$sentences = [
    "Lorem ipsum dolor sit amet, consectetur adipiscing elit.",
    "Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas.",
    "Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh.",
    "Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum.",
];

// Shuffle the array of sentences
shuffle($sentences);

// Generate a unique text paragraph
$paragraph = implode(" ", array_slice($sentences, 0, 3)); // Concatenate the first 3 sentences

echo $paragraph;

?>