Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:33322 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 40251 invoked by uid 1010); 19 Nov 2007 16:27:55 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 40236 invoked from network); 19 Nov 2007 16:27:55 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 19 Nov 2007 16:27:55 -0000 Authentication-Results: pb1.pair.com smtp.mail=helly@php.net; spf=unknown; sender-id=unknown Authentication-Results: pb1.pair.com header.from=helly@php.net; sender-id=unknown Received-SPF: unknown (pb1.pair.com: domain php.net does not designate 85.214.94.56 as permitted sender) X-PHP-List-Original-Sender: helly@php.net X-Host-Fingerprint: 85.214.94.56 aixcept.net Linux 2.6 Received: from [85.214.94.56] ([85.214.94.56:34098] helo=h1149922.serverkompetenz.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id EC/EA-05823-A89B1474 for ; Mon, 19 Nov 2007 11:27:55 -0500 Received: from dhcp-172-28-204-176.zrh.corp.google.com (unknown [193.142.125.1]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by h1149922.serverkompetenz.net (Postfix) with ESMTP id 7D89F1B3610; Mon, 19 Nov 2007 17:27:51 +0100 (CET) Date: Mon, 19 Nov 2007 17:27:51 +0100 Reply-To: Marcus Boerger X-Priority: 3 (Normal) Message-ID: <1471579833.20071119172751@marcus-boerger.de> To: Sam Barrow CC: internals@lists.php.net In-Reply-To: <1195140437.23612.5.camel@sbarrow-desktop> References: <1195140437.23612.5.camel@sbarrow-desktop> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] [PATCH] Optional scalar type hinting From: helly@php.net (Marcus Boerger) Hello Sam, since the thread turned to autoboxing. You guys may want to have a look at Pecl/SPL_Types which provides the base functionality to implement autoboxing already. Right now it provides only a Bool and an Enum class though. marcus Thursday, November 15, 2007, 4:27:17 PM, you wrote: > I found a patch by Derick online to allow for scalar type hinting, and > made it work with the newest snapshot of PHP 5.3. I also added the > ability to type hint for resources. I would like to ask that it be added > to the next PHP release. It allows type hinting for int, float, bool, > string, resource, and object, I also added the ability to use the > secondary keywords for all of these types (such as double, real, long, > etc.). > It will maintain 100% backwards compatibility, as the type hinting is > 100% optional, implemented in the same way as array/class type hinting. > I have the patch on my PC, please let me know where and when i can > submit it. I'd be happy to do the patching and submission myself, just > asking for permission here. Best regards, Marcus