Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:44680 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 87953 invoked from network); 3 Jul 2009 13:31:48 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 3 Jul 2009 13:31:48 -0000 Authentication-Results: pb1.pair.com smtp.mail=paul.biggar@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=paul.biggar@gmail.com; sender-id=pass; domainkeys=bad Received-SPF: pass (pb1.pair.com: domain gmail.com designates 72.14.220.157 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: 72.14.220.157 fg-out-1718.google.com Received: from [72.14.220.157] ([72.14.220.157:27980] helo=fg-out-1718.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id E5/A3-27980-1480E4A4 for ; Fri, 03 Jul 2009 09:31:46 -0400 Received: by fg-out-1718.google.com with SMTP id 13so110221fge.0 for ; Fri, 03 Jul 2009 06:31:42 -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 :content-transfer-encoding; bh=bSRx8tHibPDJNJPioI2NQPIxvvuNGyH/maq+mAKueEc=; b=aSPf04VkvfOBnpaZ0MT5MzLnKXUmK9ChUQTmGMsTY2OuGh1AuBsb0rV50uDpuHNCqx 1VD3GhydoDEbvCWS4Nd/tfhHFCL9o7J9VAqkxoZHVMkN1IKoVJv7d13ajOzTTRY1mlJz uRJczsONcMx52j9D8j/tQIDHN40W5IsT18lVc= 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:content-transfer-encoding; b=j2BvGLkKLEJHi04WL3iK6SmW86vjQpaQuZxvRIzlUSNXMUWvx+ty+3ZmfeEEhmxNfJ 5RU+b8YisUaKLbPSiwNRgqmK3q5G1VsKcpQBxlL9usqiJBhwoAw8ZiTYxcSMU7Pq+TCF vstxH2T1/s8cWo4nrONqFke0aRF1SYm6bbhVs= MIME-Version: 1.0 Received: by 10.86.84.6 with SMTP id h6mr1007095fgb.35.1246627901116; Fri, 03 Jul 2009 06:31:41 -0700 (PDT) In-Reply-To: <4A4BA5C8.1020204@zend.com> References: <4A4BA5C8.1020204@zend.com> Date: Fri, 3 Jul 2009 14:31:21 +0100 Message-ID: To: Ilia Alshanetsky Cc: Stanislav Malyshev , PHP internals Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] RFC: Type hinting revisited for PHP 5.3 From: paul.biggar@gmail.com (Paul Biggar) Hi Ilia, On Wed, Jul 1, 2009 at 7:07 PM, Stanislav Malyshev wrote: >> The patch is available here: http://ia.gd/patch/type_hint_53.txt > > Technical comment: as this patch changes binary API this shouldn't happen in > 5.3 branch. So maybe it's better to make it for 6. Index: Zend/zend_compile.h =================================================================== RCS file: /repository/ZendEngine2/zend_compile.h,v retrieving revision 1.316.2.8.2.12.2.40 diff -u -p -a -d -u -r1.316.2.8.2.12.2.40 zend_compile.h --- Zend/zend_compile.h 5 Jun 2009 23:20:59 -0000 1.316.2.8.2.12.2.40 +++ Zend/zend_compile.h 1 Jul 2009 16:45:02 -0000 @@ -175,7 +175,7 @@ typedef struct _zend_arg_info { zend_uint name_len; const char *class_name; zend_uint class_name_len; - zend_bool array_type_hint; + zend_uint type_hint; zend_bool allow_null; zend_bool pass_by_reference; zend_bool return_reference; I think you could make this work for 5.3, if it used the old "zend_bool array_type_hint". A zend_bool is 8 bits, so that's plenty. It would be a little bit messy, but I'm fairly confident it could be made work. Thanks, Paul -- Paul Biggar paul.biggar@gmail.com