php-fpm performance tweaks

https://seniorphp.net/high-performance-apache-with-mpm-event-and-php-fpm/   Next, we edit config file for mpm-event at /etc/apache2/mod-available/mpm-event.conf : # event MPM # StartServers: initial number of server processes to start # MinSpareThreads: […]

php: generate random number

function UniqueRandomNumbersWithinRange($min, $max, $quantity) { $numbers = range($min, $max); shuffle($numbers); return array_slice($numbers, 0, $quantity); } // $productsViewed = UniqueRandomNumbersWithinRange(1,500000,10); // print_r($productsViewed);