Re: GMP object and is_scalar()
| From: | Stas Malyshev | Date: | Mon, 30 Dec 2013 21:31:07 +0000 |
| Subject: | Re: GMP object and is_scalar() | ||
| References: | 1 2 3 4 5 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-70931@lists.php.net to get a copy of this message | ||
Hi!
> Since this (GMP numbers work like normal numbers) is new feature, we
> may choose better option.
I think you're taking it way too far. GMP numbers may support some
functions that scalars support, but that does not mean every function -
especially functions with are *specifically designed* to distinguish
scalars from objects - would do the same thing for them as for scalars.
If you're interested in their "numeric" properties - i.e. adding them,
multiplying them, etc. - fine, they work that way. But if you "pop the
hood" and look inside - no, they should not be scalars inside, because
they are not.
--
Stanislav Malyshev, Software Architect
SugarCRM: http://www.sugarcrm.com/
(408)454-6900 ext. 227