Strange behavior with PDO and MySQL when using `prepare` with named placeholders in PHP 8.2
I'm stuck trying to I'm working with a puzzling scenario while using PDO with MySQL in PHP 8.2. Specifically, when preparing a statement with named placeholders, the bindings are sometimes not being honored, leading to an SQL behavior stating that a parameter is missing. For instance, I have this code: ```php $pdo = new PDO('mysql:host=localhost;dbname=test', 'user', 'pass'); $sql = 'SELECT * FROM users WHERE id = :id AND status = :status'; $stmt = $pdo->prepare($sql); $stmt->execute([':id' => 1]); // Missing ':status' binding $result = $stmt->fetchAll(); ``` When I run this code, I get the behavior `SQLSTATE[HY093]: Invalid parameter number: number of bound variables does not match number of parameters in prepared statement`. I expected it to return an empty result set instead of throwing an behavior. I've already checked the SQL syntax and confirmed that it works when all parameters are provided. I've tried adding all parameters explicitly and even using the `bindParam` method, but the behavior remains inconsistent. Sometimes I receive the expected results, while other times it fails with the same behavior. Is this a known scenario with PDO or a specific quirk in PHP 8.2? Any insights on how to handle this or alternative approaches would be greatly appreciated. I'm developing on Debian with Php. I appreciate any insights!