Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:75214 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 13959 invoked from network); 3 Jul 2014 11:11:04 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 3 Jul 2014 11:11:04 -0000 Authentication-Results: pb1.pair.com header.from=linepogl@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=linepogl@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.219.43 as permitted sender) X-PHP-List-Original-Sender: linepogl@gmail.com X-Host-Fingerprint: 209.85.219.43 mail-oa0-f43.google.com Received: from [209.85.219.43] ([209.85.219.43:44841] helo=mail-oa0-f43.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 7F/8E-47713-84A35B35 for ; Thu, 03 Jul 2014 07:11:04 -0400 Received: by mail-oa0-f43.google.com with SMTP id o6so48116oag.2 for ; Thu, 03 Jul 2014 04:11:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=I15oddQDAsfY4iETMuk7NegBpTk0AJmwi/57PFLGSA0=; b=KEtccJZCCD7KtuynLdPrsE5mVeUS0bN5wkexmDfe2Qq3+lPXo1B9dlQqKUh31rlaSX OQ4eZtFpbHRe6/mX1bMsGcUwTLIgBlkZHpDnTLfE8cQcdJ6e+yXiH9Z+x72F80c+6w7n 364OJ48vOGPRIKj9BOG2oKU0H+4UXRGcPdXBcHLaQ7TJytrcE4JAPvhNFamMsBrnJv3q fO6IG28KfQn46li+cgdoHC9RhRQZefo7b+aB82jE0QXuYZb94ZPf6r3wg0wnwLM2Gbhm 5YwCIhbxvBAofyRx+AsVqZuSrYoC260yCzQe5U05OugdDXCmCaAQdolKzK899rfRw3Bs Wn5A== X-Received: by 10.60.220.163 with SMTP id px3mr3801405oec.35.1404385861655; Thu, 03 Jul 2014 04:11:01 -0700 (PDT) MIME-Version: 1.0 Received: by 10.76.173.161 with HTTP; Thu, 3 Jul 2014 04:10:40 -0700 (PDT) In-Reply-To: References: Date: Thu, 3 Jul 2014 13:10:40 +0200 Message-ID: To: Xen Cc: "internals@lists.php.net" Content-Type: multipart/alternative; boundary=001a1134d88269623104fd481072 Subject: Re: [PHP-DEV] not_null function From: linepogl@gmail.com (Lazare Inepologlou) --001a1134d88269623104fd481072 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 2014-07-03 11:40 GMT+02:00 Xen : > Heya, > > I was just wondering about something. > > It seems way more natural and flowing to have and use a "not_null" > function in addition to some "is_null" that currently exists. > > The reason is that most of the time you are not checking null condition, > you are really checking the non-null condition. > > Well, there is a better alternative: if ( $x =3D=3D=3D null ) .... if ( $x !=3D=3D null ) .... This syntax has also the advantage that it is marginally faster as there is neither a function call nor a negation involved. :) Lazare INEPOLOGLOU Ing=C3=A9nieur Logiciel --001a1134d88269623104fd481072--