Using PHP 8.2
session_start();
$result1 = session_cache_expire( 30 ); // setter, results in Warning: Session cache expiration cannot be changed when a session is active in ...
$result2 = session_cache_expire(); // getter
var_dump( $result1, $result2 ); // prints out: int(180) int(180) [note: 180 is the default value]
Because the session was already started, cache expiration could not be changed (warning message). However, the return value is NOT false, it is still the original, unchanged value!
So I do not know what is considered a failure to change the value as per the documentation (`On failure to change the value, false is returned.`).