Le 01/12/2025 à 21:12, BohwaZ a écrit :
Hi all,
PHP 8.5 has deprecated the following type names:
- integer
- double
- boolean
- binary
But the gettype() function still returns integer, double and boolean
instead of int, float and bool.
This inconsistency is quite confusing for new developers (and even older
ones).
I understand that changing the return of gettype might break a lot of
existing code, so maybe it's not a good idea (yet).
And if I remember correctly, that's exactly why get_debug_type() was
introduced: no BC break, and it does the job.
You should simply use get_debug_type() everywhere and never use
gettype() ever again. This is the most sensible move you can make, it
really is the function you should use in most case.
--
Pierre