Re: Fix the inconsistent behavior of PDO::PARAM_XXX

From: Date: Mon, 06 Nov 2023 12:20:07 +0000
Subject: Re: Fix the inconsistent behavior of PDO::PARAM_XXX
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-121598@lists.php.net to get a copy of this message
Hi Hans, > I think it'd be a good idea if they used FILTER_VALIDATE_BOOLEAN and > FILTER_VALIDATE_INTEGER type logic, with an error if conversion fails.. This can be difficult. Forcing an error is highly likely to destroy the existing user environment. > I wonder if PDO::PARAM_BOOL_OR_NULL would be worthwhile That's what I thought at first, but I think it might be a good idea to leave it as a fallback, especially for NULL. In fact, there have been proposals to deprecate PARAM_NULL in the past, but none have made it to the voting phase. I have not looked into it in detail yet, but I suspect that during the discussion stage, they may have come to the conclusion that it should not be abolished. Regards. Saki

« previous php.internals (#121598) next »