Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:94750 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 84477 invoked from network); 30 Jul 2016 12:46:41 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 30 Jul 2016 12:46:41 -0000 Authentication-Results: pb1.pair.com smtp.mail=rasmus@mindplay.dk; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=rasmus@mindplay.dk; sender-id=unknown Received-SPF: error (pb1.pair.com: domain mindplay.dk from 209.85.213.50 cause and error) X-PHP-List-Original-Sender: rasmus@mindplay.dk X-Host-Fingerprint: 209.85.213.50 mail-vk0-f50.google.com Received: from [209.85.213.50] ([209.85.213.50:33864] helo=mail-vk0-f50.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id C6/20-17440-0B1AC975 for ; Sat, 30 Jul 2016 08:46:40 -0400 Received: by mail-vk0-f50.google.com with SMTP id s189so71653909vkh.1 for ; Sat, 30 Jul 2016 05:46:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mindplay-dk.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=Jj7pEWGtEXnJyg+p1kRZc/J7jDDZhQPv+RPFQAgDFjM=; b=OE/hFAY1J+r/BzVjmhRiE66KcdZLu6bBxB1p+Uqowt8JNQzGqpeWuUfPvvQy7uNsme j89PrZnKuPtgHJMWcvdYEyFGwKqQFvjfnd7HScKGcvPCN7MwSlfiyZAi9bFKEqKpnenk 3z1E7P73IEnvQurZ6f8cWSRBt0jKTExNf1aDLOQE7kHyJ6IHEeZkvfgKrKF/7vuLJWDy l7LkziO0LVWEUlhDvXl4OryufKUYz755KH2fTGRG4EqO9IWUIGjv++Hm9k+4vj6XhX05 wBPOiDrmmAioUz81+LSz3eCgAiVffgi2tYYb1qydk47wnnaIlB72CtehrxVD8+BoQ7Yw Is7w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=Jj7pEWGtEXnJyg+p1kRZc/J7jDDZhQPv+RPFQAgDFjM=; b=HXLLoYKaGbGiHNTrxtnFjRsUuZmkDsIB+ciT5uEFnDmJipf8R6OTw+I4zqgGqCXH90 7IbETW1VhdPC5uQCSEVvqi0kgKRtjLXSGG3WWwVmW3brthpcyML39wxg7qONJwZeB5gy bR9WVbggN0EZWoRSYuudLa10aZdbhGo9WDjXa8TQzk3Xi6STZ/h9rBWUxiaf7yRV7wg2 CPlozDl0xUKtpdoVysSzeKvcD97Z0hmqbhoQQkZluvSkl7gIAE6aunIaQyUx00zzLUaC T+MhyQ6Ko5FVaK8IKdyzfBZP7NjoZh+oAPxZ66ObzxaAw/CPiy6ky0cykk72QRPHsBPN JUag== X-Gm-Message-State: AEkoouur/j8Eto5+iOs+lLhgBLohAIlO2UyOMxrjKtdRp6BocmEpT6fUXaUbLlz8OEI4PgPRDHFw+YrgcHWo1w== X-Received: by 10.31.168.78 with SMTP id r75mr21239285vke.8.1469882797794; Sat, 30 Jul 2016 05:46:37 -0700 (PDT) MIME-Version: 1.0 Received: by 10.103.153.195 with HTTP; Sat, 30 Jul 2016 05:46:34 -0700 (PDT) In-Reply-To: References: Date: Sat, 30 Jul 2016 14:46:34 +0200 Message-ID: To: Niklas Keller Cc: David Rodrigues , Ryan Pallas , Timothy Younger , "internals@lists.php.net" Content-Type: multipart/alternative; boundary=001a1142d416063e410538d9c2f2 Subject: Re: [PHP-DEV] optionally return class name from gettype From: rasmus@mindplay.dk (Rasmus Schultz) --001a1142d416063e410538d9c2f2 Content-Type: text/plain; charset=UTF-8 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 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. > --001a1142d416063e410538d9c2f2--