Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:54844 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 52513 invoked from network); 24 Aug 2011 07:44:13 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 24 Aug 2011 07:44:13 -0000 Authentication-Results: pb1.pair.com smtp.mail=tyra3l@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=tyra3l@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.213.42 as permitted sender) X-PHP-List-Original-Sender: tyra3l@gmail.com X-Host-Fingerprint: 209.85.213.42 mail-yw0-f42.google.com Received: from [209.85.213.42] ([209.85.213.42:35951] helo=mail-yw0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 22/E0-48631-BCBA45E4 for ; Wed, 24 Aug 2011 03:44:11 -0400 Received: by ywb3 with SMTP id 3so880616ywb.29 for ; Wed, 24 Aug 2011 00:44:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=vgi1oErFgVGAusJgo9nksSWk17JJ2VpPOrh19iIpAS8=; b=q7tI53mBiq7y0WKYECpTHraxe3Eq7ON9fAVZF6/iqQXvcdbYoRcpDZA9OyhshY8Cj6 os5diCY4F3VQycWRdUFFIySGLNVNXE9UpktpaQ+76EiROdN3BuIPAFKVo6iJzoRitqZf FoYuL0K1MQmZRPN5xJbv1APjevdmyf20OCAvQ= MIME-Version: 1.0 Received: by 10.147.78.16 with SMTP id f16mr241882yal.26.1314171848857; Wed, 24 Aug 2011 00:44:08 -0700 (PDT) Received: by 10.146.83.5 with HTTP; Wed, 24 Aug 2011 00:44:08 -0700 (PDT) In-Reply-To: <4E545A6C.60704@akbkhome.com> References: <1314115682.2635.98.camel@guybrush> <4E545A6C.60704@akbkhome.com> Date: Wed, 24 Aug 2011 09:44:08 +0200 Message-ID: To: "alan@akbkhome.com" Cc: internals@lists.php.net Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] PHP 5.3.8 Released! From: tyra3l@gmail.com (Ferenc Kovacs) On Wed, Aug 24, 2011 at 3:57 AM, alan@akbkhome.com wrot= e: > It might have been better to have waited for the is_a() fix to get sorted > out.. - It's a very annoying BC break (changes the documented behaviour), > and now it means we need 4.3.9 in a few more days. > > Let me know if you need help testing / applying etc.. > from what I understand, this won't be changed, as the current behavior is correct, the old was a bug: as Stas pointed out: "Not a bug. $var is interpreted as a class name. To know if one class extends another, the class in question (first one) should be loaded. There's no need to load the second one since if it's unknown nothing can be instance of it and existing classes can not extend it." if you used this previously from Dmitry: "Before the patch, is_a() didn't accept string as the first argument at all, so it always returned "false" and never triggered __autoload(). The proposed patch didn't revert to original behavior. It just disables autoloading and may lead to wrong result. class a {} class b extends a {} var_dump(is_a("b", "a")); // it was false before 5.3.7, now it's true I would say that the old behaviour was wrong, especially because "instanceof" and is_subclass_of() already implemented support for string arguments." so your example was bogus, as passing a non-object as a first parameter wasn't supported (see http://php.net/is_a) so your code example depends on an undefined behavior and results in a bogus result (is_a() alwas returned false if you passed a non-object) so in a way it is really a BC, but I think that this change is really a bug= fix. --=20 Ferenc Kov=C3=A1cs @Tyr43l - http://tyrael.hu