1 2 3 4 5 6
<?php // Clean up old sessions if (mt_rand(1, 10) === 4) { Database::exec("DELETE FROM session WHERE dateline < UNIX_TIMESTAMP()"); }