--TEST-- PDO Common: errorCode() --EXTENSIONS-- pdo --SKIPIF-- --FILE-- errorCode()); $query = 'SELECT 1'; if ($conn->getAttribute(PDO::ATTR_DRIVER_NAME) === 'oci') { $query .= ' FROM DUAL'; } var_dump($conn->errorCode()); var_dump($conn->errorCode()); $stmt = $conn->prepare($query); var_dump($conn->errorCode()); var_dump($stmt->errorCode()); $stmt->execute(); var_dump($stmt->errorCode()); var_dump($stmt->errorCode()); ?> --EXPECT-- NULL string(5) "00000" string(5) "00000" string(5) "00000" NULL string(5) "00000" string(5) "00000"