Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:61527 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 31829 invoked from network); 19 Jul 2012 23:22:43 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 19 Jul 2012 23:22:43 -0000 Authentication-Results: pb1.pair.com header.from=nikita.ppv@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=nikita.ppv@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.217.170 as permitted sender) X-PHP-List-Original-Sender: nikita.ppv@gmail.com X-Host-Fingerprint: 209.85.217.170 mail-lb0-f170.google.com Received: from [209.85.217.170] ([209.85.217.170:53664] helo=mail-lb0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 21/3F-18983-1C698005 for ; Thu, 19 Jul 2012 19:22:42 -0400 Received: by lbgc1 with SMTP id c1so4874770lbg.29 for ; Thu, 19 Jul 2012 16:22:38 -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=TSv3clBdu6J91AsU1pYa4hxFlNHrD2gkgEcSeJz1o4E=; b=trqgKEAQAhjjyzWQ0py+jDKgSVuHkZHUGUJjOmwVFRff9nb4ADvHmIsM8W0E7RmYu+ TS7DJCIeLnQf7rJRb9OJqyo3rZeckniB3p5Y4GyS8pDm4siL9VG+G9g23wafHA/KjNcU mHd5aGhKNglkaZ1xT+tTyJQB0HLM6wHDnHgL21X+qbNkrsCzkln1Y9ZNrDigRlV1RclP Ws7vlV3T/mIoOenVpvY3XE4JkkeuiEP7Bxr4RXbos0ugFg+2+8qCDY/ppIpB7bP559nn BZTAgYLVbUvZPabEQyTit+nhKrGdIGLNpgDbavIdDRb14WLIoyxHtuErTyzB103WK6b8 m32A== MIME-Version: 1.0 Received: by 10.112.43.135 with SMTP id w7mr2003207lbl.48.1342740158111; Thu, 19 Jul 2012 16:22:38 -0700 (PDT) Received: by 10.152.114.70 with HTTP; Thu, 19 Jul 2012 16:22:38 -0700 (PDT) In-Reply-To: References: Date: Fri, 20 Jul 2012 01:22:38 +0200 Message-ID: To: Sara Golemon Cc: Gustavo Lopes , "internals@lists.php.net" Content-Type: text/plain; charset=ISO-8859-1 Subject: Re: [PHP-DEV] zend_parse_parameters() improvements From: nikita.ppv@gmail.com (Nikita Popov) On Fri, Jul 20, 2012 at 12:20 AM, Sara Golemon wrote: > Okay, well... the main pieces of feedback I'd give on it then is to not > change the behavior of the '!' modifier. That's bad BC. The behavior for pointer-params isn't changed. Only non-pointer params will then accept the additional is_null argument. > FWIW, there are a few examples of this being handled by defining the default > value of the parameter to something non-sensical (such as a length of -1), > then doing zpp with "|l!" would leave the default -1 alone when NULL is > passed, and you can treat as "not passed". Granted this is a bit of a hack > and won't work for all situations. Your approach is more comprehensive, > just saying that for many cases it's not strictly needed. If I'm not much mistaken this is not actually possible. NULL is interpreted by PHP as a zero-y value. So the variable will be just set to 0 and you have no way to discern a real 0 and NULL. Nikita