Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:55801 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 57221 invoked from network); 14 Oct 2011 00:06:37 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 14 Oct 2011 00:06:37 -0000 Authentication-Results: pb1.pair.com smtp.mail=rasmus@lerdorf.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=rasmus@lerdorf.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain lerdorf.com from 209.85.210.170 cause and error) X-PHP-List-Original-Sender: rasmus@lerdorf.com X-Host-Fingerprint: 209.85.210.170 mail-iy0-f170.google.com Received: from [209.85.210.170] ([209.85.210.170:61229] helo=mail-iy0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id D6/11-49888-C0D779E4 for ; Thu, 13 Oct 2011 20:06:37 -0400 Received: by iaeo4 with SMTP id o4so2317377iae.29 for ; Thu, 13 Oct 2011 17:06:33 -0700 (PDT) Received: by 10.42.72.194 with SMTP id p2mr11778766icj.0.1318550793582; Thu, 13 Oct 2011 17:06:33 -0700 (PDT) Received: from [192.168.200.5] (c-50-131-46-20.hsd1.ca.comcast.net. [50.131.46.20]) by mx.google.com with ESMTPS id g16sm3472090ibs.8.2011.10.13.17.06.32 (version=SSLv3 cipher=OTHER); Thu, 13 Oct 2011 17:06:33 -0700 (PDT) Message-ID: <4E977D07.4010503@lerdorf.com> Date: Thu, 13 Oct 2011 17:06:31 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:7.0.1) Gecko/20110929 Thunderbird/7.0.1 MIME-Version: 1.0 To: Alan Knowles CC: internals@lists.php.net References: <4E969596.4090704@akbkhome.com> <4E970257.2010906@sugarcrm.com> <4E977A4B.4020609@akbkhome.com> In-Reply-To: <4E977A4B.4020609@akbkhome.com> X-Enigmail-Version: 1.4a1pre Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] is_a fix for 5.4 and HEAD From: rasmus@lerdorf.com (Rasmus Lerdorf) On 10/13/2011 04:54 PM, Alan Knowles wrote: > On Thursday, October 13, 2011 11:23 PM, Stas Malyshev wrote: >> On 10/13/11 12:39 AM, Alan Knowles wrote: >>> Can someone apply this to HEAD and PHP_5_4, or let me have karma. >>> >>> https://bugs.php.net/patch-display.php?bug_id=55475&patch=final_patch_for_5_4_and_HEAD&revision=latest >>> >>> >>> Thanks >>> Alan >>> >>> >> +/* {{{ proto bool is_subclass_of(mixed object_or_string, string >> class_name [, bool allow_string=true]) >> +/* {{{ proto bool is_a(mixed object_or_string, string class_name [, >> bool allow_string=false]) >> >> This is quite strange - two almost identical functions with completely >> different default semantics. > Yes, and if you can think of a way to depreciate them now so that it > does not break BC and could be changed later, please feel free, but I've > looked at it quite a bit and could not find any other way. Argh! Pet-peeve, it's deprecate. Depreciate means something completely different. I agree that it is slightly messy, but we have painted ourselves into a bit of a corner with the 5.3 mess. Stas, the whole point here is that changing the is_a() default in 5.3 caused huge problems, including security ones, so setting allow_string to false by default fixes that BC break in 5.3. Considering the huge amount of code hit by this I think we should keep that default in 5.4. Alan, does is_subclass_of() actually need the allow_string flag at all? It has always been documented take a mixed and hit the autoloader, so why would we need an option to disable the string? -Rasmus