Do not use:
if (session_gc() == false)
OR
if (!session_gc())
to evaluate if the garbage collector was triggered successfully since it also returns how many sessions it deleted, which can be 0 (and that evaluates to false with loose operators).
Sounds dumb, but it's a pitfall i fell into and it generated some confusion. Instead, use strict operator "===":
if (session_gc() === false)