Re: GMP object and is_scalar()

From: Date: Sun, 29 Dec 2013 22:12:22 +0000
Subject: Re: GMP object and is_scalar()
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-70911@lists.php.net to get a copy of this message
Hi Nikita, On Mon, Dec 30, 2013 at 2:54 AM, Nikita Popov <nikita.ppv@gmail.com> wrote: > Sorry, I don't understand what you're saying. Why would is_scalar return > true for an **object**? Since GMP object works just like numbers, this could cause bug that users assume it is "number" or "scalar". Variables are promoted to GMP object when math operator is applied. (This is nice, IMO) GMP objects works like number mostly, this can be cause of bugs in user scripts. It would be more intuitive for users if GMP object is handled as "number" IMHO. Regards, -- Yasuo Ohgaki yohgaki@ohgaki.net

« previous php.internals (#70911) next »