12 ms·
The third example on the type safety slides bugs me (using the type safe comparison operator to prevent both a boolean true and non-zero int evaluating the same
by scooter53080 19y ago
The third example on the type safety slides bugs me (using the type safe comparison operator to prevent both a boolean true and non-zero int evaluating the same.) I would prefer use of a consistent return type from the function to begin with. I guess since some built in php functions behave this way, it's important to know/use...but I don't think I would recommend writing a function such that the type safe equal check is necessary.