[prev in list] [next in list] [prev in thread] [next in thread] 

List:       php-internals
Subject:    Re: [PHP-DEV] optionally return class name from gettype
From:       Rasmus Schultz <rasmus () mindplay ! dk>
Date:       2016-07-30 12:46:34
Message-ID: CADqTB_gmgU8ax-zKCV2t0ecsaZjijS-U37UL0hhp4JFK=VsSQw () mail ! gmail ! com
[Download RAW message or body]


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.
>


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic