If PHP encounters a number beyond the bounds of the int type, it will be interpreted as a float instead. Also, an operation which results in a number beyond the bounds of the int type will return a float instead.
The size of an int is platform-dependent, although a maximum value of about two billion is the usual value (that’s 32 bits signed). 64-bit platforms usually have a maximum value of about 9E18. PHP does not support unsigned ints. int size can be determined using the constant PHP_INT_SIZE , maximum value using the constant PHP_INT_MAX , and minimum value using the constant PHP_INT_MIN .
That might be the error. So wouldn’t it make sense to include something in this function to prevent that Kirby is totally broken when using this function on a 32 bit system? Something like a if / else clause https://www.php.net/manual/de/function.is-float.php
The lifetime is given as a UNIX timestamp, if this timestamp is beyond the size allowed on your system, it will fail. I guess Kirby could check if the given number is an integer, but in this case, the forever function would not work as expected, either.
It won’t hurt to create an issue, let’s see what the devs say.