Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:86772 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 60028 invoked from network); 21 Jun 2015 21:57:39 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 21 Jun 2015 21:57:39 -0000 Authentication-Results: pb1.pair.com smtp.mail=rasmus@lerdorf.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=rasmus@lerdorf.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain lerdorf.com designates 209.85.220.182 as permitted sender) X-PHP-List-Original-Sender: rasmus@lerdorf.com X-Host-Fingerprint: 209.85.220.182 mail-qk0-f182.google.com Received: from [209.85.220.182] ([209.85.220.182:34816] helo=mail-qk0-f182.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id B0/60-57034-25337855 for ; Sun, 21 Jun 2015 17:57:38 -0400 Received: by qkbp125 with SMTP id p125so87191877qkb.2 for ; Sun, 21 Jun 2015 14:57:35 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :cc:subject:references:in-reply-to:content-type; bh=Ls8nr9KYnn5ObZBo2U1IDdoG+Jqgu/n4lDXOW0RmEXI=; b=RZsGov/1rRJaZYpLtZ+q+I+xax1brupjGzCF3I6H/pfmjxajESCrwgIvRZVXRrmBAG FfV1GynRZYeho7RUausjVgxi1uyZZrIdcYGHNQxvXU0fpVNJKHu85vk+Nlgf1JVHNnHn On5N6BAISmX/XqpEXggaHEen1sKld5vzTwv7ISznwinfcSRNiVV7d1wMTXGRRAUp3sSH uMlMiSc0yxJaS0IrhiePPVcn/bS3srTLOXkxzX5+lw3+oQ3Gmr3E3cHlQtlKxAypUnfH LZ2Vo2lZZCdVVvD3HoprYoYMdTS0Ezooe8t0zyWn9qzGpoaAEMGbz1gwUKNlULYqDNJz 2WMw== X-Gm-Message-State: ALoCoQkRpbwhCp99M6mt/27bmH6xoiz8J+182a7n1ED/Mf3dQRqHJvgUbYTo0Ot47kkQ2y4lbd/4 X-Received: by 10.55.26.205 with SMTP id l74mr28789400qkh.1.1434923855647; Sun, 21 Jun 2015 14:57:35 -0700 (PDT) Received: from [192.168.100.133] (rrcs-24-136-125-201.nyc.biz.rr.com. [24.136.125.201]) by mx.google.com with ESMTPSA id b191sm9274292qka.14.2015.06.21.14.57.33 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 21 Jun 2015 14:57:33 -0700 (PDT) Message-ID: <5587334C.2080401@lerdorf.com> Date: Sun, 21 Jun 2015 17:57:32 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Kalle Sommer Nielsen CC: Nikita Popov , PHP internals References: <5586E5D1.4010901@lerdorf.com> <55870947.4060304@lerdorf.com> In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Gksn7s07CDdjwhxFCeCTVSbHbkwUErcEo" Subject: Re: [PHP-DEV] hasType() for internal function parameters? From: rasmus@lerdorf.com (Rasmus Lerdorf) --Gksn7s07CDdjwhxFCeCTVSbHbkwUErcEo Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 06/21/2015 03:40 PM, Kalle Sommer Nielsen wrote: > Hi >=20 > 2015-06-21 20:58 GMT+02:00 Rasmus Lerdorf : >> Or we bite the bullet and fix the arginfo everywhere to make it >> consistent. It wouldn't be that hard to write a script to generate the= >> bulk of it. >=20 > I think fixing arginfo sounds like the right solution, writing a > script for it should not be so trival. Even the ones that have some arginfo aren't all correct. For example: https://github.com/php/php-src/blob/master/Zend/zend_builtin_functions.c#= L132 which currently says: ZEND_BEGIN_ARG_INFO_EX(arginfo_define, 0, 0, 3) ZEND_ARG_INFO(0, constant_name) ZEND_ARG_INFO(0, value) ZEND_ARG_INFO(0, case_insensitive) ZEND_END_ARG_INFO() That says there are 3 required params when it should clearly be 2. But really that block should be: ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_define, 0, 2, _IS_BOOL, 0, 0) ZEND_ARG_TYPE_INFO(0, constant_name, IS_STRING, 0) ZEND_ARG_INFO(0, value) ZEND_ARG_TYPE_INFO(0, case_insensitive, _IS_BOOL, 0) ZEND_END_ARG_INFO() It seems way too lazy to not fix these before we release 7.0. Especially the ones that are outright wrong. So, having called us lazy, I better dig in and do something about it. I'll fix up all of the ones in zend_builtin_functions.c today. And move on to others after. Definitely a tedious task that we could use some extra hands on. -Rasmus --Gksn7s07CDdjwhxFCeCTVSbHbkwUErcEo Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlWHM0wACgkQlxayKTuqOuDbUACdHOHDh35hD9YA8E2hlzTj+t7d MOgAn3y+q34dYQlzlSTbko+x63lAH6BS =aIZq -----END PGP SIGNATURE----- --Gksn7s07CDdjwhxFCeCTVSbHbkwUErcEo--