Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:87939 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 39884 invoked from network); 26 Aug 2015 18:38:14 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 26 Aug 2015 18:38:14 -0000 Authentication-Results: pb1.pair.com smtp.mail=neclimdul@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=neclimdul@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.223.171 as permitted sender) X-PHP-List-Original-Sender: neclimdul@gmail.com X-Host-Fingerprint: 209.85.223.171 mail-io0-f171.google.com Received: from [209.85.223.171] ([209.85.223.171:33467] helo=mail-io0-f171.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 17/97-17883-4970ED55 for ; Wed, 26 Aug 2015 14:38:12 -0400 Received: by iods203 with SMTP id s203so29980633iod.0 for ; Wed, 26 Aug 2015 11:38:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=ykMDIpz2alWbHKKwAkH+9TPOa7KrE848ynlNZhHWcn8=; b=aKpDivb9KFjO5w/mV59KGDjxFOWGo6iiP3v3fFuf5gdlEKyoB7P66rDWOnvaPzm4cK pqADFdrdu1GjGjhZHbmYLZDvTr12ErKUTFGLhRUstojt1H/4UQxDTufcxnDBQLoRfSIo smkyetF3qCZ7d3LeW0SOFCcouLlDmCFvlW9tFI81Ebf8hQ9ydrm90TrFc6iDC93JS5Sd ZcggAys5YfRf1DEuDTSRH4RqY/EQx5ZWTSq731KQLC9WwjJITkcBEztCzhMW9SrAjz46 sogAny5vJj8WzLf5LLL8WF3XOmrQAxWyOQSmq6eB2jnJs6df+hCpJfSbMvzqgDihkhjh AJpQ== MIME-Version: 1.0 X-Received: by 10.107.149.18 with SMTP id x18mr5654234iod.141.1440614289246; Wed, 26 Aug 2015 11:38:09 -0700 (PDT) Received: by 10.79.28.83 with HTTP; Wed, 26 Aug 2015 11:38:09 -0700 (PDT) In-Reply-To: <8C74463E-DBA2-4015-8159-0B44D973387F@craigfrancis.co.uk> References: <55DD4269.4090402@gmail.com> <6348DFA7-04BD-41BB-A500-17A8A531B56C@craigfrancis.co.uk> <55DDA4C9.9040603@gmail.com> <3C69BF4B-52E6-4D04-8601-8D23DFCC538E@craigfrancis.co.uk> <55DDD60F.5090509@gmail.com> <8C74463E-DBA2-4015-8159-0B44D973387F@craigfrancis.co.uk> Date: Wed, 26 Aug 2015 13:38:09 -0500 Message-ID: To: Craig Francis Cc: Rowan Collins , "internals@lists.php.net" Content-Type: multipart/alternative; boundary=001a1140fee4f830ae051e3b260f Subject: Re: [PHP-DEV] PHP 7.1 - Address PHPSadness #28? From: neclimdul@gmail.com (James Gilliland) --001a1140fee4f830ae051e3b260f Content-Type: text/plain; charset=UTF-8 On Wed, Aug 26, 2015 at 12:07 PM, Craig Francis wrote: > > On 26 Aug 2015, at 16:06, Rowan Collins wrote: > > > Craig Francis wrote on 26/08/2015 14:53: > >> On 26 Aug 2015, at 12:36, Rowan Collins > wrote: > >> > > >> where NULL may be a perfectly valid value. > > > > It's not that NULL isn't a valid value; it's that "doesn't exist" isn't > a meaningful state for a variable. It's like checking if the current line > number is greater than 100, it shouldn't mean anything to the compiled > program. See the SO answer I linked earlier for more thought experiments > along these lines. > > > I think you have been spending too much time in C. > > Most of the PHP code bases I've worked on set variables to NULL at some > point (and they are not calling unset, because that isn't the intention). > > I think there is a misunderstanding here that is drawing this out. Assigning meaning to NULL in any language is wrong. That is why it should be treated as if the variable didn't exist and isset is appropriate. This is a common pitfall in database design as well where you can allow NULL as a field value. Assigning meaning to to that NULL value can quickly lead to problem. > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > --001a1140fee4f830ae051e3b260f--