Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:33158 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 29535 invoked by uid 1010); 15 Nov 2007 15:46:36 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 29520 invoked from network); 15 Nov 2007 15:46:36 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 15 Nov 2007 15:46:36 -0000 Received: from [127.0.0.1] ([127.0.0.1:17750]) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ECSTREAM id 82/FB-63493-6D96C374 for ; Thu, 15 Nov 2007 10:46:30 -0500 Authentication-Results: pb1.pair.com smtp.mail=sam@sambarrow.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=sam@sambarrow.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain sambarrow.com from 205.234.132.11 cause and error) X-PHP-List-Original-Sender: sam@sambarrow.com X-Host-Fingerprint: 205.234.132.11 scottsdale.servershost.net Received: from [205.234.132.11] ([205.234.132.11:38765] helo=scottsdale.servershost.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 21/F8-63493-F366C374 for ; Thu, 15 Nov 2007 10:31:24 -0500 Received: from [65.207.49.92] (port=37146) by scottsdale.servershost.net with esmtpsa (SSLv3:RC4-MD5:128) (Exim 4.68) (envelope-from ) id 1IsggE-0006cb-0M for internals@lists.php.net; Thu, 15 Nov 2007 09:30:58 -0600 To: internals@lists.php.net Content-Type: text/plain Date: Thu, 15 Nov 2007 10:27:17 -0500 Message-ID: <1195140437.23612.5.camel@sbarrow-desktop> Mime-Version: 1.0 X-Mailer: Evolution 2.10.1 Content-Transfer-Encoding: 7bit X-Antivirus-Scanner: Clean mail though you should still use an Antivirus X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - scottsdale.servershost.net X-AntiAbuse: Original Domain - lists.php.net X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - sambarrow.com X-Source: X-Source-Args: X-Source-Dir: Subject: [PATCH] Optional scalar type hinting From: sam@sambarrow.com (Sam Barrow) 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.