Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:37110 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 74603 invoked from network); 17 Apr 2008 18:31:57 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 17 Apr 2008 18:31:57 -0000 Authentication-Results: pb1.pair.com header.from=paul.biggar@gmail.com; sender-id=pass; domainkeys=bad Authentication-Results: pb1.pair.com smtp.mail=paul.biggar@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.162.178 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: paul.biggar@gmail.com X-Host-Fingerprint: 209.85.162.178 el-out-1112.google.com Received: from [209.85.162.178] ([209.85.162.178:8789] helo=el-out-1112.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id A8/54-05127-D9797084 for ; Thu, 17 Apr 2008 14:31:57 -0400 Received: by el-out-1112.google.com with SMTP id m34so135873ele.13 for ; Thu, 17 Apr 2008 11:31:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=7jYmARl8rqfHPpi4quCIn4h3tBauwtHzRty2fyjJ+S8=; b=aXZzG3uRRov5RoVK8/cTqGlhS074osFq3wyY4POnW7JYq2xEFINcMweGFeydHjXv9xZ7YeDU/aLidbfeifaMO5NRkqiAqk//SSNG9WKuUPCGPbQ+dPQlbEiMQKVV1gJEx+wjg99fFHvoqXllQgXIiout7ZbscxzNXeRu+UIwWSM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=v69ih73u7/hrvlU8I1P6N2ePg+MGUPhS2/tjRkTPNkMEaBCTLDyRWj/tVmnQHSyCg3OJavEhWHZj9hQS20KLseyz9tQ5PxHjY0uF4XO7XsiRvYrcN/kmcLLY52bHgMqnjTbCjc5UaZP+1FZk9jrNGZXJWxI5IO0xNO6MmUWkxwQ= Received: by 10.114.190.6 with SMTP id n6mr1952874waf.51.1208457114284; Thu, 17 Apr 2008 11:31:54 -0700 (PDT) Received: by 10.114.255.17 with HTTP; Thu, 17 Apr 2008 11:31:54 -0700 (PDT) Message-ID: Date: Thu, 17 Apr 2008 20:31:54 +0200 To: "Stanislav Malyshev" Cc: "Felipe Pena" , internals@lists.php.net In-Reply-To: <4807955B.5010602@zend.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <1208404255.5665.34.camel@pena> <480782BE.8050608@zend.com> <4807955B.5010602@zend.com> Subject: Re: [PHP-DEV] [RFC] Type hints (parameter and return value) From: paul.biggar@gmail.com ("Paul Biggar") Hi, On Thu, Apr 17, 2008 at 8:22 PM, Stanislav Malyshev wrote: > > > If you talk about consistency, you should remember that right now no > > > function and no feature in PHP relies on strict checking of primitive > types. > > > > > > > That is not the case (or I am very much mistaken). In particular, > > is_int, which I mentioned in my email, is predicated on the IS_LONG > > type only. > > > > Read that "no function except for a tiny handful of very special cases like > is_* and serializes and probably one or two other functions that I forgot", > ok? is_* are the important functions, since they are the ones which most resemble the type hints under discussion. Up until now, anyone implementing this in user-land would use is_int(). It makes perfect sense that type hints should mimic this behaviour. Not doing so would be very inconsistent, and so confusing. Paul -- Paul Biggar paul.biggar@gmail.com