Re: optionally return class name from gettype
| From: | Rasmus Schultz | Date: | Sat, 30 Jul 2016 12:46:34 +0000 |
| Subject: | Re: optionally return class name from gettype | ||
| References: | 1 2 3 4 5 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-94750@lists.php.net to get a copy of this message | ||
I agree, an argument that essentially turns it into a different function is
not a good practice.
Suggestions for a function-name?
typeof() or vartype() maybe?
On Fri, Jul 29, 2016 at 8:17 PM, Niklas Keller <me@kelunik.com> wrote:
> >
> > Niklas Keller wrote:
> > > I'm not sure on the boolean through, I think a new function might be
> > better.
> >
> > In this point I desagree.
> > I think that boolean is the best way, mainly to avoid a new function
> > on userland.
> > It's like an "extension" for gettype(), and make senses just extend it.
>
>
> The issue is that it's not clear what this boolean means just from reading
> the code.
> If you follow Clean Code, you shouldn't have something like that, only in
> very, very rare cases.
>