#33888 [Opn->Bgs]: join does not use objects' __toString() fcn

From: Date: Wed, 27 Jul 2005 16:27:31 +0000
Subject: #33888 [Opn->Bgs]: join does not use objects' __toString() fcn
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-82546@lists.php.net to get a copy of this message
ID: 33888 Updated by: tony2001@php.net Reported By: wckits at rit dot edu -Status: Open +Status: Bogus Bug Type: Class/Object related Operating System: SunOS PHP Version: 5.0.3 New Comment: "It is worth noting that the __toString method will only be called when it is directly combined with echo() or print()." http://www.php.net/manual/en/language.oop5.magic.php Previous Comments: ------------------------------------------------------------------------ [2005-07-27 18:24:39] wckits at rit dot edu Description: ------------ Calling join(",",$array_of_objects) will return "object,object,object..." even if all of those objects have toString functions defined. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=33888&edit=1

« previous php.bugs (#82546) next »