Re: [RFC][Discussion] Add MariaDB-specific features to mysqlnd and mysqli
| From: | Robert Humphries | Date: | Sun, 19 Apr 2026 13:44:48 +0000 |
| Subject: | Re: [RFC][Discussion] Add MariaDB-specific features to mysqlnd and mysqli | ||
| References: | 1 2 3 4 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-130666@lists.php.net to get a copy of this message | ||
> Despite your convincing arguments for better network utilization by
> providing the types, I still think we should not offer the possibility
> of specifying the types. I don't know what other PHP developers on
> this mailing list think about it, but for me the type feature goes
> against the nature of PHP. Making the parameter optional is very good
> choice and eases my concerns slightly, so if I am outnumbered in my
> opinion, I won't be upset.
> The number of mysqli users grows increasingly smaller. Out of this,
> the number of people who will use execute_many and who will need to
> optimize for TINYINT is unbelievably tiny. Any string easily
> overshadows the numerical data. Thus, this feature won't see much
> legitimate use.
I think the risk here is that currently the
types parameter is
supported in existing code (via bind_param); and it is not
deprecated / no warnings exist on its usage in the manual. I think
having the parameter in new code be optional was a sensible change;
but until mysqli_stmt::bind_param is deprecated or the types
parameter is removed there; allowing users to specify the types in new
functions where there is a benefit to doing so (even if only a small
number of people will use the benefit) makes sense to do unless there
are technical or other reasons not to. If setting types for a prepared
statement shouldn't be done in PHP, then where that currently can be
done should be deprecated and in the future removed.