Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:42872 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 1961 invoked from network); 28 Jan 2009 19:22:17 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 28 Jan 2009 19:22:17 -0000 Authentication-Results: pb1.pair.com smtp.mail=kkooporation@googlemail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=kkooporation@googlemail.com; sender-id=pass; domainkeys=bad Received-SPF: pass (pb1.pair.com: domain googlemail.com designates 209.85.132.247 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: kkooporation@googlemail.com X-Host-Fingerprint: 209.85.132.247 an-out-0708.google.com Received: from [209.85.132.247] ([209.85.132.247:54633] helo=an-out-0708.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 66/44-16201-660B0894 for ; Wed, 28 Jan 2009 14:22:15 -0500 Received: by an-out-0708.google.com with SMTP id c2so1397889anc.38 for ; Wed, 28 Jan 2009 11:22:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:date:x-google-sender-auth:message-id:subject:from:to:cc :content-type; bh=mBTd0qze7Mjpzk2vPyrlbHkfL9INRvaJIdERmnB5cpg=; b=RHIXhuS90Ma3QugR0kNcjRtnTwY1m5Gw8geRcvMx8cccjqDEE5bSvp19MSV4eMRLLl dZw0tXM6lRcjnI7GLE/et+qg/K/E1oM608ZdsdPYvMrGaJLdu4v/a2qQ6uSKXmiBX4dr TNEVmk0N2S6oZbEj7jXC0HFrPuUbGkQr8O8wU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; b=bPow9m7PPhjO12Jc0eHNLKByupjBszAnSJAehwGQ2bXY67O+nj3eLb+ydn2nQ9Fn87 +WCILzWi6HBkqh7gSBk6Mb3vZ7YfHupli3Z0KAuxdruwN62qVAJmn90CnzvOheES7+Vk FltQZiuTsDLE6OFAljxcK5HSuciRSP4rJBLx4= MIME-Version: 1.0 Sender: kkooporation@googlemail.com Received: by 10.142.14.18 with SMTP id 18mr2448885wfn.35.1233170531083; Wed, 28 Jan 2009 11:22:11 -0800 (PST) In-Reply-To: References: <497E1FFB.5050404@gnat.ca> <497E5DF6.4060606@oracle.com> <1233063239.8505.10.camel@goldfinger> <497F37F8.6070407@gnat.ca> <49807F9E.4020401@pewasoft.com> <4980976D.60202@gnat.ca> <498098D7.2080901@macvicar.net> Date: Wed, 28 Jan 2009 20:22:11 +0100 X-Google-Sender-Auth: 3d5e367a312f8f18 Message-ID: To: Paul Biggar Cc: Dan , Scott MacVicar , internals@lists.php.net Content-Type: multipart/alternative; boundary=000e0cd1776a73e4d704618fe310 Subject: Re: [PHP-DEV] substr passing null... From: kureal@kkooporation.de (Kenan R Sulayman) --000e0cd1776a73e4d704618fe310 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Why don't make the function return FALSE if parameter equals NULL ? -- (c) Kenan Sulayman Freelance Designer and Programmer Life's Live Poetry 2009/1/28 Paul Biggar > On Wed, Jan 28, 2009 at 6:39 PM, Dan wrote: > >> > >> You're assumption is wrong then, NULL isn't treated as not passing a > >> value. The reason it worked with substr was by pure chance. > >> > > > > Out of interest, is there a reason that that is the case? Surely passing > > null would be best treated as the same as passing nothing? > > NULL is a value. There is no way to tell that when you pass NULL, you > actually intended to pass nothing and use the default value. > > Paul > > > -- > Paul Biggar > paul.biggar@gmail.com > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > --000e0cd1776a73e4d704618fe310--