Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:44801 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 76323 invoked from network); 7 Jul 2009 23:08:23 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 7 Jul 2009 23:08:23 -0000 Authentication-Results: pb1.pair.com header.from=paul.biggar@gmail.com; sender-id=pass; domainkeys=bad Authentication-Results: pb1.pair.com smtp.mail=paul.biggar@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.218.206 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: 209.85.218.206 mail-bw0-f206.google.com Received: from [209.85.218.206] ([209.85.218.206:57178] helo=mail-bw0-f206.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 19/E7-37453-665D35A4 for ; Tue, 07 Jul 2009 19:08:23 -0400 Received: by bwz2 with SMTP id 2so4673479bwz.23 for ; Tue, 07 Jul 2009 16:08:19 -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=1b/nsdLxtesxD6X3lMOxR6+yFbcqrQUOf2Ey0tsgcjo=; b=TO+8//LxUWPn01+1UV5k/Iyzfm7Fwyzi1PIp3x/s6P6iO1W49vVO+Io530QriGOEGb 0MIFvUHypznaCh6aROQVyBP7TAmeyjLJC9Z8v6AT4ysUTM+W6vIdOZanfauZAKFXXKoF usXzyvMiinoayIknhdiM0jmPRzZPbMNiPSYdo= 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=qBBnHU9A7uDRcJwS9BhRxqD4lysn+6HF6GrndCufgFZV+1S3JZbw1ltJ+kWIfFnUIh gZPfOMiNIiBMwZCrHUWEXPwEwQEaTiTIBWrESWWWachE5aIIg52ZdzKgkDX26JtHuyd9 GoDZGBRWECCm/853CW+9oY3Gtx9PcgUvCzVfc= MIME-Version: 1.0 Received: by 10.204.72.129 with SMTP id m1mr6253466bkj.61.1247008099188; Tue, 07 Jul 2009 16:08:19 -0700 (PDT) In-Reply-To: <1247006344.3760.164.camel@goldfinger.johannes.nop> References: <2D0F5226-EBCA-4B45-BF01-8ED1C643976C@prohost.org> <1247006344.3760.164.camel@goldfinger.johannes.nop> Date: Wed, 8 Jul 2009 00:07:59 +0100 Message-ID: To: =?UTF-8?Q?Johannes_Schl=C3=BCter?= , Ilia Alshanetsky Cc: PHP internals Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] Type hinting/casting request for vote From: paul.biggar@gmail.com (Paul Biggar) 2009/7/7 Johannes Schl=C3=BCter : > On Mon, 2009-07-06 at 20:52 -0400, Ilia Alshanetsky wrote: >> Last week or so there was a fairly detailed discussion on the >> internals list regarding type hinting based on my original patch. > Having an "old" 5.3 extension with a typehint expecting an array > arg_info.array_type_hint will be set to 1. > The newly compiled engine with this patch will then do > > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 /* existing type alrea= dy matches the hint or forced type */ > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 if (Z_TYPE_P(arg) =3D= =3D cur_arg_info->array_type_hint || Z_TYPE_P(arg) =3D=3D (cur_arg_info->ar= ray_type_hint ^ (1<<7))) { > > as it's main type check, but Z_TYPE_P(arg) will be IS_ARRAY (5) which > doesn't match the 1 provided by the old extension, other checks in there > will fail too, so the valid param will be rejected whereas an integer > (IS_LONG 1) will be accepted where the extension expects an array. I raised this in my review, to which Ilia replied "It should be fine" (http://news.php.net/php.internals/44707). I would not have thought it would be fine. I had been thinking that Ilia would have to hack it to make 1 mean array in this case, which would be ugly, but workable. Based on the arguments in this thread, I believe it shouldn't go into 5.3 at all. Are we allowed break the ABI for 5.4 (I would think so, but amn't sure). Overall, I'm very disappointed with the way this has been conducted. When reviews were posted they are not replied to (Stas posted http://news.php.net/php.internals/44710, I posted http://news.php.net/php.internals/44706, and I dont see any replies except a cursory response to mine). Furthermore: - the RFC process has been wilfully ignored (despite multiple requests) - a vote was asked for when Lukas was still trying to discuss his proposa= l - the vote was take it or leave it - there has been a general attitude of "throwing the toys out of the pram= " I am mostly for the patch, and I 100% support the idea. However, I feel I have to vote against it, and urge others to do the same, until the entire mess is rectified. Ilia, I respect the work you have put into this, but I would ask you to withdraw the patch and the vote until these things have been sorted out. -1 Thanks, Paul --=20 Paul Biggar paul.biggar@gmail.com