Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:54771 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 98851 invoked from network); 22 Aug 2011 08:00:31 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 22 Aug 2011 08:00:31 -0000 Authentication-Results: pb1.pair.com header.from=hannes.magnusson@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=hannes.magnusson@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.83.42 as permitted sender) X-PHP-List-Original-Sender: hannes.magnusson@gmail.com X-Host-Fingerprint: 74.125.83.42 mail-gw0-f42.google.com Received: from [74.125.83.42] ([74.125.83.42:42555] helo=mail-gw0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id E4/D2-13024-A9C025E4 for ; Mon, 22 Aug 2011 04:00:31 -0400 Received: by gwb17 with SMTP id 17so3703929gwb.29 for ; Mon, 22 Aug 2011 01:00:11 -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=C8Sq1AVwUxgHlgKPEelBz5amcId8NFVWyIn4JRuY1Yg=; b=bN75Ms/yE37uZ+EHsgqzq7Hi1J+1V9fRCd7KRH3NVToXVe+hk9A8/DVvrEzw78sGA/ 7rV02Dg0d+u43ZLYytSSvJPjGLz6cuhWWG3OjJmpxbgfNQpfBNP1ha3ZdVkVANKJDZYW CHdIoTSXLwg66I+Sh7EslU2ok7CaXjgk+kUDM= MIME-Version: 1.0 Received: by 10.147.53.37 with SMTP id f37mr1969744yak.25.1314000011136; Mon, 22 Aug 2011 01:00:11 -0700 (PDT) Received: by 10.147.99.2 with HTTP; Mon, 22 Aug 2011 01:00:11 -0700 (PDT) In-Reply-To: References: Date: Mon, 22 Aug 2011 10:00:11 +0200 Message-ID: To: Mads Lie Jensen Cc: internals@lists.php.net Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] is_a() triggers __autoload() in 5.3.7 From: hannes.magnusson@gmail.com (Hannes Magnusson) On Mon, Aug 22, 2011 at 08:22, Mads Lie Jensen wrote: > On Mon, 22 Aug 2011 08:10:28 +0200, kalle@php.net (Kalle Sommer Nielsen) > wrote: > >>> After upgrading to php 5.3.7, whenever I use is_a($object, 'ClassName')= ; >>> the autoloader of classes is now called. >>> >>> This did not happen in earlier versions of php 5.3 that I used before. >>> But I cannot find any =C2=A0mention of it anywhere, no open bugs for it= , and >>> nothing in the changelogs. >>> >>> Is it a bug or is it intentional that it has started behaving this way? >> >>I'm unable to reproduce your case in 5.3.4RC1, 5.3.7 and 5.3-svn: >>http://pastie.org/2410070 > > Ah, I now see that it only happens when trying to check something which > is not actually an object: > > > function __autoload($class) { > =C2=A0 =C2=A0 =C2=A0 =C2=A0echo "Would load: " . $class . PHP_EOL; > } > > $var =3D "test"; > var_dump(is_a($var, 'B')); > > $obj =3D new Stdclass; > var_dump(is_a($obj, 'C')); > > ?> > > But still, it did not happen in earlier phpversions. I can reproduce that in 5.3-svn and 5.4-svn. Please file a bug report for it, this should probably be fixed in 5.3.8 too= . -Hannes