Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:91141 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 43534 invoked from network); 9 Feb 2016 09:29:16 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 9 Feb 2016 09:29:16 -0000 Authentication-Results: pb1.pair.com header.from=rowan.collins@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=rowan.collins@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.49 as permitted sender) X-PHP-List-Original-Sender: rowan.collins@gmail.com X-Host-Fingerprint: 74.125.82.49 mail-wm0-f49.google.com Received: from [74.125.82.49] ([74.125.82.49:33654] helo=mail-wm0-f49.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id FD/A0-39202-B61B9B65 for ; Tue, 09 Feb 2016 04:29:16 -0500 Received: by mail-wm0-f49.google.com with SMTP id g62so166264541wme.0 for ; Tue, 09 Feb 2016 01:29:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-type:content-transfer-encoding; bh=eyyh1mWvW/IO7HaOxvOk65y9jDTE1g//NzHjr44FNNw=; b=sqg0N/QUgIOFfBsXjZpTCVsPrrinW6WLiQzJDpMt+k6VwlVC6wEFROEbN7R1HcAccl KgOsH9JZMuUJF7+0uxsMgp7lslJqYI1H4TNnPDjfca4nphFKGNCNeWBlvdRqq5K3rC0A 5hGZzJyJ0iCUOjcj5N/jnx/rG5m+IzRZEtnxVcdevnHku2B/8j2lx0JtRQl8I+wS3oue tI0R5sJGTCizTT/YtNCLw5TG1iy3MzeUOY3izu+4uG6FQCJQNkhR0qRTcz/LmqpTJucA 1UZaESTcog0fbWF6fD68uq8EhP8hZ9+R3xxltNbULrEkZh/lt0D6p7AFvLCY4LjTFv8S woPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-type :content-transfer-encoding; bh=eyyh1mWvW/IO7HaOxvOk65y9jDTE1g//NzHjr44FNNw=; b=Zyn3UZDyUY7teBlsZPlMlvI1iZCZj/GfuI+Y4IGdwJtahV/V8WIIfw3RZKH0nXdRun NTrsouYEZyOzEAYGzgwFU5HvYKbEZPG4Gr8d0UqAbwgWBf2ONo8Kr+GvXq0Q5APaDwL4 5/5tf+mDP5Zb5zIDXmugYyH97FoH3O3WxwfVuqnZ8+rMWDDTlTf+5kg0wknc/81ntyoD 5dRjy03GKAn3ZN9DQSHejJu6unY0SlScq+mnVzHyQBi/xcBJVapLtb8edWlg7dZjtieE AH0Yy5z9fBx7Jqx+Gc/t+BTdhAnKLgqGviKScjP8Caa1svVxXj0BKGvStmyvATGZsZXm ggjw== X-Gm-Message-State: AG10YOQiQXJrTrEgfkfbpV154hLwA/46WovBVfhGePzZSW/OtXdHS0BxTcveUXrU6dDnzA== X-Received: by 10.28.17.8 with SMTP id 8mr3416221wmr.65.1455010153348; Tue, 09 Feb 2016 01:29:13 -0800 (PST) Received: from [192.168.0.152] ([93.188.182.58]) by smtp.googlemail.com with ESMTPSA id t195sm16703127wme.13.2016.02.09.01.29.12 for (version=TLSv1/SSLv3 cipher=OTHER); Tue, 09 Feb 2016 01:29:12 -0800 (PST) To: internals@lists.php.net References: <56B8BA24.7040003@lsces.co.uk> Message-ID: <56B9B10F.7090805@gmail.com> Date: Tue, 9 Feb 2016 09:27:43 +0000 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Proposal for a new array function From: rowan.collins@gmail.com (Rowan Collins) Yasuo Ohgaki wrote on 09/02/2016 02:52: > bool is_array(mixed $var [, long $type_of_array]); > > where $type_of_array is bit flags such as PHP_ARRAY_REAL, > PHP_ARRAY_HASH, PHP_ARRAY, PHP_ARRAY_RECLUSIVE, etc. I like this variant (although I don't like the term "real"). Unlike returning the type, it's still amenable to optimisation, because you're stating which checks you're interested in, so the implementation can pick the fastest version of those checks. Regards, -- Rowan Collins [IMSoP]