Re: GMP object and is_scalar()
| From: | Yasuo Ohgaki | Date: | Mon, 30 Dec 2013 22:12:05 +0000 |
| Subject: | Re: GMP object and is_scalar() | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-70937@lists.php.net to get a copy of this message | ||
Hi Stas,
On Tue, Dec 31, 2013 at 7:03 AM, Stas Malyshev <smalyshev@sugarcrm.com>wrote:
> > Only classes that should be evaluated as scalar should implement this
> > magic method.
>
> We already have type convertors. "scalar" is not a type, it's a group of
> types. I don't think it makes sense to convert something to an abstract
> scalar - it should be specific scalar type.
Should it? PHP is weakly typed language.
I haven't thought well for scalar object yet and has to consider
various cases.
One thing clear to me is users expects GMP numbers behave like
scalar numbers most likely.
Yet another option for PHP 5.6 is to note GMP numbers as
EXPERIMENTAL.
There are many issues to resolve. IMHO.
Regards,
--
Yasuo Ohgaki
yohgaki@ohgaki.net