Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:88379 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 7332 invoked from network); 19 Sep 2015 21:24:46 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 19 Sep 2015 21:24:46 -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 209.85.212.170 as permitted sender) X-PHP-List-Original-Sender: rowan.collins@gmail.com X-Host-Fingerprint: 209.85.212.170 mail-wi0-f170.google.com Received: from [209.85.212.170] ([209.85.212.170:37487] helo=mail-wi0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 3B/66-43089-D92DDF55 for ; Sat, 19 Sep 2015 17:24:46 -0400 Received: by wicfx3 with SMTP id fx3so67659984wic.0 for ; Sat, 19 Sep 2015 14:24:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=user-agent:in-reply-to:references:mime-version :content-transfer-encoding:content-type:subject:from:date:to :message-id; bh=wtI1/9/Xf7UYdrSJqUTU3zJcY5Qz3+0XRwVzEvLdwqM=; b=Bp4HR1nWkiQ+JWpVL9O/K3t45QREP/a1bx0yQjvRVdwCAieK26NtKXEg8CdAXTA+P3 3YzGCbSSxdpPDCmDPEYUSgUMi2e/Nb885oOy5HHwjZKFytJZopwMnAoYV1mh2BSD72UF bjY7kReRiDacGdngwGqGSx/D23u9Hdxjk6nyXXkQfq3Ja7nHo6iSsHnMs7eZRYYn26L9 gIi+DxeWf/3npTLrHPnpZMUQVE711yBJLta/59ieGb6SyZJ8tVaGrYyO/u0+1Xx47TH8 79jmghQTuAw6G3gfP6WHdX3jGriFrjR3De56uGwnPp2jNgDPE3kYHDLbT65iSuUrXk6g bDIg== X-Received: by 10.180.198.109 with SMTP id jb13mr5257062wic.17.1442697883377; Sat, 19 Sep 2015 14:24:43 -0700 (PDT) Received: from [100.79.33.209] ([213.205.194.85]) by smtp.gmail.com with ESMTPSA id c2sm5104422wiy.11.2015.09.19.14.24.41 (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 19 Sep 2015 14:24:42 -0700 (PDT) User-Agent: K-9 Mail for Android In-Reply-To: <55FD7613.1080403@lsces.co.uk> References: <55FB3A60.1040601@gmail.com> <55FB4270.7000204@lsces.co.uk> <55FB4969.7080600@gmail.com> <55FB5BA6.6050606@lsces.co.uk> <55FBF265.5000502@gmail.com> <55FBF7B7.4050603@lsces.co.uk> <55FC1A77.7090406@gmail.com> <55FC221A.7020108@lsces.co.uk> <55FC2588.6030809@gmail.com> <55FC2B17.3070909@lsces.co.uk> <55FC2F2F.9060403@gmail.com> <55FC33F1.3090903@lsces.co.uk> <55FC354B.5070209@gmail.com> <55FC39B2.5070005@lsces.co.uk> <55FC45C7.9010202@gmail.com> <55FC4991.1050903@lsces.co.uk> <7872E9F4-AE19-4681-B2EF-215751AE4CBE@thesba.com> <55FC5A14.8020301@gmail.com> <55FC8D53.3080904@lsces.co.uk> <93020C79-3920-4FC8-8B6B-F1D16C6C709C@gmail.com> <55FD7613.1080403@lsces.co.uk> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Date: Sat, 19 Sep 2015 22:22:34 +0100 To: Lester Caine ,internals@lists.php.net Message-ID: <9B86E351-089D-4356-BC8A-F683BA31D1A8@gmail.com> Subject: Re: [PHP-DEV] PHP 7.1 - Address PHPSadness #28? From: rowan.collins@gmail.com (Rowan Collins) On 19 September 2015 15:49:55 BST, Lester Caine wrote: >On 19/09/15 13:15, Rowan Collins wrote: >If there was a bug with 'isset' it is that it returns false for a >variable that IS SET to null. I honestly think that the only problem there is the name. If instead of isset() and empty() we had quiet_is_null and quiet_boolval, nobody would be the slightest bit surprised by their behaviour, and people looking to see if an array key exists would be more likely to find array_key_exists. >if the variable does not exist there is no way of testing for that >state >prior to calling is_null() Correct, there is no way of testing for that full stop. > so we get a warning. THAT is the warning >that >I'm talking about. Now if you have another way of identifying that the >variable 'exists' before calling is_null() then I apologise but I've >not >found it yet :( If what you want to do is avoid the notice, then you don't need to "find out before calling is_null", you need to call isset *instead of* is_null. Again, ignore the name, and concentrate on what it actually does. This conversation feels to me like you saying you want a flying car, then complaining because your current car makes a nasty noise when you accelerate for take off in first gear. No matter what you do, your current car won't fly, but if you switch into fifth gear, the noise will go away. You want a function to test for variable existence, which is a feature PHP does not have; you then jump to talking about not wanting warning noises, which PHP absolutely has the function to avoid. It is not the noise that is stopping your car flying, so please stop talking about it. Regards, -- Rowan Collins [IMSoP]