Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:23936 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 80483 invoked by uid 1010); 4 Jun 2006 15:42:31 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 80468 invoked from network); 4 Jun 2006 15:42:31 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 4 Jun 2006 15:42:31 -0000 X-PHP-List-Original-Sender: stas@zend.com X-Host-Fingerprint: 80.74.107.235 mail.zend.com Linux 2.5 (sometimes 2.4) (4) Received: from ([80.74.107.235:46471] helo=mail.zend.com) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id E8/2C-49656-66FF2844 for ; Sun, 04 Jun 2006 11:42:31 -0400 Received: (qmail 30478 invoked from network); 4 Jun 2006 15:42:02 -0000 Received: from shire.zend.office (10.1.2.160) by internal.zend.office with SMTP; 4 Jun 2006 15:42:02 -0000 Date: Sun, 4 Jun 2006 18:42:02 +0300 (IDT) X-X-Sender: frodo@shire.zend.office To: Andi Gutmans cc: Marcus Boerger , internals@lists.php.net In-Reply-To: <7.0.1.0.2.20060604083527.034ae330@zend.com> Message-ID: References: <795156743.20060603134212@marcus-boerger.de> <509342741.20060603183859@marcus-boerger.de> <7.0.1.0.2.20060603175211.02208a50@zend.com> <20060604030100.1093d2f9@pierre-u64> <7.0.1.0.2.20060603181129.0396fc18@zend.com> <44823B41.5000608@akbkhome.com> <44823C51.7040408@lerdorf.com> <64299052.20060604120852@marcus-boerger.de> <20060604135241.3beacb32@pierre-u64> <1853717276.20060604140317@marcus-boerger.de> <1912643046.20060604141822@marcus-boerger.de> <7.0.1.0.2.20060604071847.03b74850@zend.com> <1834492302.20060604165624@marcus-boerger.de> <7.0.1.0.2.20060604075725.03d77b20@zend.com> <1996647038.20060604170829@marcus-boerger.de> <7.0.1.0.2.20060604081244.03dcd938@zend.com> <334553601.20060604171820@marcus-boerger.de> <7.0.1.0.2.20060604083527.034ae330@zend.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Subject: Re: [PHP-DEV] Missing __toString() part From: stas@zend.com (Stanislav Malyshev) AG>>We should probably make this a requirement and I don't know of one AG>>today that doesn't have an associated class name. I believe some parts AG>>of PHP might blow up if this isn't supported. There are parts that can blow up if get_class_name is NULL or returns NULL (though good practice would be to filter such places out but I'm not sure it was ever accomplished) - however it doesn't have to be NULL to be a problem. Imagine two extensions that bridge external objects - e.g., Java and .Net one - that attempt to return real class of an object, but if it doesn't succeed (e.g., internal reflection doesn't work for some reason) they return "???" instead. It's not that good, but we can't catch it and we can't even put up a requirement out saying "your 'don't know' value should be different from other's" - how's one supposed to know what other's value is? And if you don't do something very unrelated would break in very strange ways - so it's be quite hard even point to what is the cause. So in fact classname here would not be a good idea for ID. Handler table, however, combined with object handle seems to be good way to ID an object - it's how the engine identifies them after all... -- Stanislav Malyshev, Zend Products Engineer stas@zend.com http://www.zend.com/ +972-3-6139665 ext.115