Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:75258 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 8450 invoked from network); 5 Jul 2014 07:42:42 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 5 Jul 2014 07:42:42 -0000 Authentication-Results: pb1.pair.com header.from=kris.craig@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=kris.craig@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.219.44 as permitted sender) X-PHP-List-Original-Sender: kris.craig@gmail.com X-Host-Fingerprint: 209.85.219.44 mail-oa0-f44.google.com Received: from [209.85.219.44] ([209.85.219.44:58804] helo=mail-oa0-f44.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 8A/90-33346-17CA7B35 for ; Sat, 05 Jul 2014 03:42:42 -0400 Received: by mail-oa0-f44.google.com with SMTP id i7so2544474oag.3 for ; Sat, 05 Jul 2014 00:42:39 -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=uXhABT+LLJvNRfchKLiYvLY+tcu0gA8qxpkNo5X3s7s=; b=pvwE3xon+mt422zWefVNfD2YPXapVcw3q9wiDleSibWgIdPAHLEUMTCPTAOJKJrXEY M+9cABCA5I5WKeWPvSZs6tjaKVWh7VAilkrBxVfMizI0XNhvwmaJv4Jo13sDTEwQxbIW F9pwAWuIxE8bB3qBCUfpbt9HH6WlxYd9OhAfVyL0mZxr96n6OSXOwsgUL6iU71NoCzFt ZpGZA1/D2zqJK7WHbDRvBrYgDvNUWZ+yfFQJHEcQb3HPe8TSWCiUxP/5H4FLmysIhXVa ImPNciwGApPJnl6nbfa3lHTQovOk6dH/5kzCXm/Mgz+f/sxLiX1BUN2XA2lb59t1pAgX 5Hsg== MIME-Version: 1.0 X-Received: by 10.182.204.103 with SMTP id kx7mr16794216obc.57.1404546159571; Sat, 05 Jul 2014 00:42:39 -0700 (PDT) Received: by 10.202.15.72 with HTTP; Sat, 5 Jul 2014 00:42:39 -0700 (PDT) In-Reply-To: References: <002b01cf9784$4c1fe670$e45fb350$@tutteli.ch> Date: Sat, 5 Jul 2014 00:42:39 -0700 Message-ID: To: Tjerk Meesters Cc: Xen , Levi Morrison , internals Content-Type: multipart/alternative; boundary=e89a8ff1ce10e979f204fd6d620a Subject: Re: [PHP-DEV] not_null function From: kris.craig@gmail.com (Kris Craig) --e89a8ff1ce10e979f204fd6d620a Content-Type: text/plain; charset=UTF-8 > > >> Currently, this is what's available for checking a variable's status >> without throwing any errors: >> >> Variable exists and !== NULL: isset( $var ) >> Variable === NULL or doesn't exist: !isset( $var ) >> Variable == NULL or doesn't exist: empty( $var ) >> Variable exists and != NULL: !empty( $var ) >> Variable exists (including NULL): ???? >> > > Yep, nothing exists for that; we have a whole bunch of `_exists()` > functions, but not e.g. `variable_exists()` or even a dedicated `exists` > opcode. > > >> Variable exists and === NULL: ???? >> > > That's simply `@$var === null` or `@is_null($var)` of course ;-) > Is there any practical reason that you know of why 'exists' doesn't exist (maybe there's some reason why it shouldn't)? Or is it just something that never came up? If the latter, I wonder if there'd be any support for changing that. --Kris --e89a8ff1ce10e979f204fd6d620a--