Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:60720 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 81856 invoked from network); 1 Jun 2012 21:03:23 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 1 Jun 2012 21:03:23 -0000 Authentication-Results: pb1.pair.com header.from=ab@php.net; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=ab@php.net; spf=unknown; sender-id=unknown Received-SPF: unknown (pb1.pair.com: domain php.net does not designate 85.214.73.107 as permitted sender) X-PHP-List-Original-Sender: ab@php.net X-Host-Fingerprint: 85.214.73.107 klapt.com Received: from [85.214.73.107] ([85.214.73.107:35576] helo=h1123647.serverkompetenz.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 32/CB-45898-A1E29CF4 for ; Fri, 01 Jun 2012 17:03:22 -0400 Received: by h1123647.serverkompetenz.net (Postfix, from userid 1006) id B23E66FC032; Fri, 1 Jun 2012 23:03:19 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on h1123647.serverkompetenz.net X-Spam-Level: X-Spam-Status: No, score=-2.9 required=3.5 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.3.1 Received: from webmail.klapt.com (h1123647.serverkompetenz.net [127.0.0.1]) by h1123647.serverkompetenz.net (Postfix) with ESMTP id 6FC859145A3 for ; Fri, 1 Jun 2012 23:03:18 +0200 (CEST) Received: from 94.216.44.68 (SquirrelMail authenticated user anatoliy@belsky.info) by webmail.klapt.com with HTTP; Fri, 1 Jun 2012 23:03:18 +0200 Message-ID: <371954f04ec32d79a45a84ac009ca4a8.squirrel@webmail.klapt.com> Date: Fri, 1 Jun 2012 23:03:18 +0200 To: internals@lists.php.net Reply-To: ab@php.net User-Agent: SquirrelMail/1.4.21 MIME-Version: 1.0 Content-Type: text/plain;charset=UTF-8 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal Subject: 5.4.3 type hint handling From: ab@php.net ("Anatoliy Belsky") Hi, I'm experiencing an issue adding type hints to the function prototypes. The following definition gives the "unknown typehint" error when invoking a function ZEND_BEGIN_ARG_INFO_EX(arg_info_trader_adosc, 0, 0, 4) ZEND_ARG_TYPE_INFO(0, high, IS_ARRAY, 0) ZEND_ARG_TYPE_INFO(0, low, IS_ARRAY, 0) ZEND_ARG_TYPE_INFO(0, close, IS_ARRAY, 0) ZEND_ARG_TYPE_INFO(0, volume, IS_ARRAY, 0) ZEND_ARG_TYPE_INFO(0, fastPeriod, IS_LONG, 1) ZEND_ARG_TYPE_INFO(0, slowPeriod, IS_LONG, 1) ZEND_END_ARG_INFO(); The reason I trip up on this is to generate the xml doc proto for the extension. Therefore I'm using the extended ZEND_ARG_INFO version. Without type hints there are no param types in the xml. Quickly looking at the sources I realize that 5.4.3 has an explicit type hint check which was previously ignored in 5.3 http://lxr.php.net/opengrok/xref/PHP_5_4/Zend/zend_execute.c#600 The reason of writing this is not to start a new discussion about scalar types, for God's sake not :), but just to point at the collision with the current core and doc generator. A simple way to fix this would be to restore the old 5.3 behaviour just passing on scalar types. Or may be there were a simple solution for this, despite 5.4.3 is already issued? Cheers Anatoliy