Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:44578 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 93577 invoked from network); 1 Jul 2009 17:22:23 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 1 Jul 2009 17:22:23 -0000 Authentication-Results: pb1.pair.com smtp.mail=sgkelly4@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=sgkelly4@gmail.com; sender-id=pass; domainkeys=bad Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.200.171 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: sgkelly4@gmail.com X-Host-Fingerprint: 209.85.200.171 wf-out-1314.google.com Received: from [209.85.200.171] ([209.85.200.171:17844] helo=wf-out-1314.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 60/B0-24906-D4B9B4A4 for ; Wed, 01 Jul 2009 13:22:22 -0400 Received: by wf-out-1314.google.com with SMTP id 28so441146wfc.26 for ; Wed, 01 Jul 2009 10:22:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :from:date:message-id:subject:to:cc:content-type; bh=DBSxkZi2tsWLVNMldmmALajIOD3Qpjb+CodUe+HcAFE=; b=ZjGwl6iA68OnrxRDnyPaVw3Vbm9Vk3esuDy06H6ubl3NqCFeVF+sA3HStld9f94lSq ozMYKLXZL/5C1w2ypip6fH5/EvZ5z/eGHsK/4aCCioNzyr/db1PJiMW8dGH1o+28VV7q oXIq1Jr/NdFyzrpXv+0n7/Ghskvyw3xu/cn9A= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; b=t+iYGurZa+DvrcMMxznm8BimRcqWETi1KS4XREh+BQTEZ81DKvlUYq6GnpL2d2XX+S VsOqp229T158bbDnUXRL24ZwlK1TELftVuGbegHOSi5Zm8MxZJHg12fkKRgul9c8MFxg 1WhD2qAdD8FbqeCmECISjHv/e5d8OMm2ZI/1k= MIME-Version: 1.0 Received: by 10.142.226.7 with SMTP id y7mr615704wfg.303.1246468443123; Wed, 01 Jul 2009 10:14:03 -0700 (PDT) In-Reply-To: References: Date: Wed, 1 Jul 2009 10:13:43 -0700 Message-ID: To: Gwynne Raskind Cc: PHP internals Content-Type: multipart/alternative; boundary=000e0cd32a66c6b021046da80cc0 Subject: Re: [PHP-DEV] RFC: Type hinting revisited for PHP 5.3 From: sgkelly4@gmail.com (Graham Kelly) --000e0cd32a66c6b021046da80cc0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit This is great! I've always wanted to see optional type hinting for PHP. On Wed, Jul 1, 2009 at 10:09 AM, Gwynne Raskind wrote: > On Jul 1, 2009, at 12:59 PM, Ilia Alshanetsky wrote: > >> There has been quite a bit of discussion on this list, IRC, developer >> meetings, etc... about introduction of type hinting to PHP. Most people >> appear to think that this would be a good idea, but there is a reason why it >> is not in PHP already. The main source of conflict appears to be that in >> some cases typical type hinting is just too strict for PHP's typeless nature >> (most people expect that "1" == 1, while int type hint would definitely >> reject string "1"). Personally, I disagree with that opinion, but I can >> understand people who raise that issue. At work we've been using PHP 5.2 >> with type hinting for nearly 2 years now with great success, it makes code >> much easier to read and understand and the security benefit of type hinting >> is not to be under valued. In many cases type hinting can present a last >> line of defense against unexpected input for numeric fields, which are >> typically abused to do SQL injection. >> > [snip] > >> My hope is that the latest changes will allow this to become a standard >> part of PHP. >> > > +1 (+1000, actually :) > > -- Gwynne > > > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > --000e0cd32a66c6b021046da80cc0--