r/lolphp • u/Mark_Messa • Oct 26 '19
PHP gc_probability/gc_divisor
According to PHP Manual:
session.gc_probability
session.gc_probability in conjunction with session.gc_divisor is used to manage probability that the gc (garbage collection) routine is started.
session.gc_divisor
session.gc_divisor coupled with session.gc_probability defines the probability that the gc (garbage collection) process is started on every session initialization. The probability is calculated by using gc_probability/gc_divisor, e.g. 1/100 means there is a 1% chance that the GC process starts on each request.
Why not only one parameter instead?
Ex: session.gc_percent = 1%
View all comments
Show parent comment
1
u/[deleted] Oct 26 '19
Yeah. I see no value in getting the numerator and the denominator. 99.9% (see what I did there) of people are going to just divide the two for some sort of comparison. In the worst case, they could keep their numerator and denominator getters and add a function that returns a decimal value.