Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:44707 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 79732 invoked from network); 4 Jul 2009 19:00:21 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 4 Jul 2009 19:00:21 -0000 Authentication-Results: pb1.pair.com header.from=ilia@prohost.org; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=ilia@prohost.org; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain prohost.org from 209.85.210.182 cause and error) X-PHP-List-Original-Sender: ilia@prohost.org X-Host-Fingerprint: 209.85.210.182 mail-yx0-f182.google.com Received: from [209.85.210.182] ([209.85.210.182:59040] helo=mail-yx0-f182.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id B4/4C-06257-4C6AF4A4 for ; Sat, 04 Jul 2009 15:00:20 -0400 Received: by yxe12 with SMTP id 12so4936008yxe.29 for ; Sat, 04 Jul 2009 12:00:16 -0700 (PDT) Received: by 10.90.26.3 with SMTP id 3mr2365324agz.27.1246734016922; Sat, 04 Jul 2009 12:00:16 -0700 (PDT) Received: from ?10.195.95.195? ([24.114.234.33]) by mx.google.com with ESMTPS id 25sm2352211aga.57.2009.07.04.12.00.14 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 04 Jul 2009 12:00:16 -0700 (PDT) References: Message-ID: <0DC8F442-7487-4196-8FE6-B69A3F0D1100@prohost.org> To: Paul Biggar In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit X-Mailer: iPhone Mail (7A341) Mime-Version: 1.0 (iPhone Mail 7A341) Date: Sat, 4 Jul 2009 15:00:02 -0400 Cc: PHP internals Subject: Re: [PHP-DEV] RFC: Type hinting revisited for PHP 5.3 From: ilia@prohost.org (Ilia Alshanetsky) It should be fine Ilia Alshanetsky On 2009-07-04, at 2:49 PM, Paul Biggar wrote: > Hi Ilia, > > On Wed, Jul 1, 2009 at 5: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 > > > RE your second patch, from http://ilia.ws/patch/type_hint_53_v2.txt > > > Index: Zend/zend_compile.c > =================================================================== > RCS file: /repository/ZendEngine2/zend_compile.c,v > retrieving revision 1.647.2.27.2.41.2.109 > diff -u -p -a -d -u -r1.647.2.27.2.41.2.109 zend_compile.c > --- Zend/zend_compile.c 7 Jun 2009 15:46:51 -0000 > 1.647.2.27.2.41.2.109 > +++ Zend/zend_compile.c 4 Jul 2009 17:20:50 -0000 > @@ -1511,10 +1514,9 @@ void zend_do_receive_arg(zend_uchar op, > zend_error(E_COMPILE_ERROR, "Default value for > parameters with a > class type hint can only be NULL"); > } > } > - } else { > - cur_arg_info->array_type_hint = 1; > - cur_arg_info->class_name = NULL; > - cur_arg_info->class_name_len = 0; > + break; > + > + case IS_ARRAY: > > So, to signify an array type hint, we used to use 1, and we now use > IS_ARRAY, which is 4. I'm not 100% sure that's an ABI problem, but I > just wanted to check. > > > if (op == ZEND_RECV_INIT) { > if (Z_TYPE(initialization->u.constant) == IS_NULL || > (Z_TYPE(initialization->u.constant) == IS_CONSTANT && > !strcasecmp(Z_STRVAL(initialization->u.constant), "NULL"))) { > cur_arg_info->allow_null = 1;