On my system (5th gen i7) random_int() takes about 14x longer to do the same number of calculations than rand().
for ($i=0; $i<10000000; $i++)
$x = rand(1, PHP_INT_MAX);
Takes 0.86 seconds for rand(), 12.29 seconds for random_int(). So use random_int() somewhat sparingly.
If it's not really important to be truly random, use rand() instead, especially in a tight loop.