The PHP PDO method lastInsertId () actually returns a numeric value, but it can also return something completely different, like some weird SQLSTATE code or something else. In any case, it returns a non-numeric value, I would like to register an error. Is there a way to safely verify this?
source share