How does the use of usleep() in PHP affect the performance of a script, and what are the potential drawbacks of using it?

Using usleep() in PHP can slow down the execution of a script by pausing the program for a specified amount of time. This can be useful for simulating delays or controlling the rate at which certain operations are performed. However, excessive use of usleep() can lead to decreased performance and responsiveness of the script, as it introduces unnecessary delays.

// Example of using usleep() in PHP
for ($i = 0; $i < 10; $i++) {
    // Perform some operation
    usleep(100000); // Pause for 100 milliseconds
}