(Requirements: PHP 5.4+)
To test the operation of the Memcache and Memcached modules, you can run script. After the first launch, the recorded date will be displayed in Memcache and Memcached, if they are loaded, and each subsequent launch will display exactly the time of the first.
For each module, the message “Start memcache(d)».
<?php echo "<br>Start memcache<br>"; $memcache = new Memcache(); if (!$memcache->get('int') && !$memcache->get('string') && !$memcache->get('array')) { } echo $memcache->get('string') . " " . $memcache->get('int') . ", " . $memcache->get('array')[0] . ":" . $memcache ->get('array')[1] . "<br>"; } echo "<br>Start memcached<br>"; $m = new Memcached(); if (!$m->get('Dint') && !$m->get('Dstring') && !$m->get('Darray')) { } echo $m->get('Dstring') . " " . $m->get('Dint') . ", " . $m->get('Darray')[0] . ":" . $m->get('Darray')[1] . "<br>"; } ?>