On Thu, 25 Feb 2021 at 08:35, Claude Pache <claude.pa...@gmail.com> wrote:

>
> Hi,
>
> In the paragraph “Difference between PDO and mysqli”, you propose:
>
> “Array keys are completely ignored. mysqli doesn't have emulated prepares
> nor does it have named parameters.”
>
> Instead of ignoring the keys, I think it is better to throw a TypeError
> when the provided array is not a “list” in the sense of `array_is_list()`
> introduced [in a recent RFC] (https://wiki.php.net/rfc/is_list). The
> reasons are:
>
> * provide the user with useful feedback when they are attempting to do
> something dubious and/or their intent is ambiguous;
> * be forward compatible with possible future addition of named parameters;
> * reduce the difference with PDO for input that are accepted in both
> mysqli and PDO.
>
> —Claude
>
>
 Hi Claude,

Thanks for the feedback. I thought about it and I have to say I honestly do
not know which way would be better. I haven't received any other comments
so far. What you are proposing makes sense, but I don't know how to
implement this. I am not so experienced with PHP internals so I would
require some help to add such an error.

The only other comments I have seen so far are from Reddit
https://www.reddit.com/r/PHP/comments/llntv5/php_rfc_mysqli_bind_in_execute/

I could add another voting option for people to decide whether they want
the keys to be ignored or if they want an error. I appreciate it if anyone
has any other comments about this proposal too.

Kind Regards,
Kamil

Reply via email to