Hi,
Matteo Beccati wrote:
Hi Adam,
On 07/12/2016 23:37, Adam Baratz wrote:
For decimal, double wouldn't be the correct type anyway, as it could
cause loss of precision.
Sure, agree the name is imprecise. "Double" is mainly relevant to zvals.
It's not about naming. Double is relevant both to PHP and SQL and is a
floating point type. On the other hand, decimal/numeric fields should be
represented as strings as they are fixed point/precision, which is
something we don't have in stock php. In fact bcmath uses strings too.
On the subject of naming, if we were to add this, I would think the name
should be PDO::PARAM_FLOAT instead, as that's the more common name for
the PHP float type now. It's IS_DOUBLE internally, but that is mostly an
implementation detail, like IS_LONG.
Thanks.
--
Andrea Faulds
https://ajf.me/
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php