Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:55072 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 11673 invoked from network); 1 Sep 2011 19:50:31 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 1 Sep 2011 19:50:31 -0000 Authentication-Results: pb1.pair.com smtp.mail=truth@proposaltech.com; spf=softfail; sender-id=softfail Authentication-Results: pb1.pair.com header.from=truth@proposaltech.com; sender-id=softfail Received-SPF: softfail (pb1.pair.com: domain proposaltech.com does not designate 66.94.237.155 as permitted sender) X-PHP-List-Original-Sender: truth@proposaltech.com X-Host-Fingerprint: 66.94.237.155 nm5-vm0.access.bullet.mail.mud.yahoo.com Received: from [66.94.237.155] ([66.94.237.155:32960] helo=nm5-vm0.access.bullet.mail.mud.yahoo.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 7E/02-33826-502EF5E4 for ; Thu, 01 Sep 2011 15:50:30 -0400 Received: from [66.94.237.194] by nm5.access.bullet.mail.mud.yahoo.com with NNFMP; 01 Sep 2011 19:50:27 -0000 Received: from [66.94.237.112] by tm5.access.bullet.mail.mud.yahoo.com with NNFMP; 01 Sep 2011 19:50:27 -0000 Received: from [127.0.0.1] by omp1017.access.mail.mud.yahoo.com with NNFMP; 01 Sep 2011 19:50:27 -0000 X-Yahoo-Newman-Id: 628815.81022.bm@omp1017.access.mail.mud.yahoo.com Received: (qmail 16624 invoked from network); 1 Sep 2011 19:50:27 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1314906627; bh=49XfupQCYYsc40WsxqNdInErV8eql4U56NA8zruz0ZU=; h=X-Yahoo-Newman-Property:X-YMail-OSG:X-Yahoo-SMTP:Received:Subject:From:To:In-Reply-To:References:Content-Type:Date:Message-ID:Mime-Version:X-Mailer:Content-Transfer-Encoding; b=uCoO93womHfs89gXrfmxfujwaRSgisHhSj9Q6t6ybdC1sDe0ErPlXGj4z4QTb7DMl5JirXKk/3ch5huzUVn8FfoAd4PhInw8fMR3QLeYm1XJKmbsqt9M1ixDPDYbDhZ9IZn1hBi/h5jSCmdw8tdfmKVO/vM4kkX7QUJB8YfAxLo= X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: QQ7LLZIVM1lG20HVKvMh7CGbAYy6DoUe8LPzYYuLlwDWQO4 SfOUUR_bDSpmqECb.OIAA9Ke31c2131dFQdL4n0m7_f_Z44WLlTuwx64oeLA 9YDWYrd2G5PPtBRVyZ69tvcdMjkeC6y7ilc_VCIUinLISTCA5o3MyUic_ENL gb4c2UkD79IHshd02zopSBKncnq3mgG4QWfvRf8zvn30SzROg8fHFPSjWTNB 6nni9.oNyxPZFfZnI5xOipaY21FBe5xup5xSNSr6zL7_pCLcDI8aRfgehM.O M0I4NGHFITxo_bRwYc18q8O.bb8vo1TDeHYaVru0oavduCvasZcn4Uhwiy5G 7f3DXSUxC0KxkeiNNnWV..5zNkQxomCg178zIZs78dNOL3v4XBg.qi3GtaTZ z3F8yrDJ6w9WAHdEvolk.q3JtKb440h2rNiEqKt5HA8sf5TxAoOPy5YldD1f YJW3umGNasgCAf5Z1WcBs X-Yahoo-SMTP: jWG9jiaswBBOCHlPTWD9zJWRnNyiDJE- Received: from [192.168.2.102] (truth@208.127.5.147 with login) by smtp105.sbc.mail.bf1.yahoo.com with SMTP; 01 Sep 2011 12:50:26 -0700 PDT To: PHP Internals List In-Reply-To: References: <4E4D4B8D.6090406@sugarcrm.com> Content-Type: text/plain; charset="ISO-8859-1" Date: Thu, 01 Sep 2011 12:50:25 -0700 Message-ID: <1314906625.8167.31.camel@inspiron> Mime-Version: 1.0 X-Mailer: Evolution 2.30.1.2 Content-Transfer-Encoding: 7bit Subject: get_class From: truth@proposaltech.com (Todd Ruth) $x = null; get_class($x) returns get_class($this) as of 5.3. I don't recall seeing a discussion of this on the list and I can't find anything about this change in the archives. The documentation is currently self-contradictory... Under "Return Values": Returns the name of the class of which object is an instance. Returns FALSE if object is not an object. Under "Changelog": Since 5.3.0 NULL became the default value for object, so passing NULL to object now has the same result as not passing any value. (BTW, I don't see that listed in http://us.php.net/ChangeLog-5.php#5.3.0 ) I guess there hasn't been a lot of screaming about it, so maybe it isn't a big deal, but it seems like a significant BC break to me. Maybe it's just because I've been beating my head against a wall for so long trying to figure out why my code was behaving so strangely. ;) I can't believe it's impossible to differentiate between receiving an argument and not receiving an argument. Would anyone really intentionally pass a null to this function to get the result of get_class($this)? Now that I know about this BC break, I'm OK and can avoid the issue, but for the sake of the next person to hit this, I felt I should post on the topic. I almost posted a bug directly, but the behavior is documented, so I thought this would be the correct place. - Todd