Re: [PHP-DEV] __toString() with cast is broken in php5 RC1

2004-04-03 Thread Andi Gutmans
s Boerger" <[EMAIL PROTECTED]> To: "David Giffin" <[EMAIL PROTECTED]> Cc: "Marcus Boerger" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Friday, April 02, 2004 12:27 PM Subject: Re: [PHP-DEV] __toString() with cast is broken in php5 RC1 > Hello Davi

Re: [PHP-DEV] __toString() with cast is broken in php5 RC1

2004-04-02 Thread Derick Rethans
On Fri, 2 Apr 2004, Adam Maccabee Trachtenberg wrote: > On Fri, 2 Apr 2004, Derick Rethans wrote: > > > *casting* works fine, we just don't do it automagically: > > > > print (string) $obj; > > Not anymore: Yup, I know :) Derick -- PHP Internals - PHP Runtime Development Mailing List To unsubs

Re: [PHP-DEV] __toString() with cast is broken in php5 RC1

2004-04-02 Thread Adam Maccabee Trachtenberg
On Fri, 2 Apr 2004, Derick Rethans wrote: > *casting* works fine, we just don't do it automagically: > > print (string) $obj; Not anymore: class foo { function __toString() { return "I am a string."; } } $foo = new foo; print (string) $foo; Object id #1 -adam -- [EMAIL PROTECTED] au

Re: [PHP-DEV] __toString() with cast is broken in php5 RC1

2004-04-01 Thread Derick Rethans
On Thu, 1 Apr 2004, David Giffin wrote: > Is this going to change back? The php5 documentation on the zend site > shows that both casting and print/echo should work. *casting* works fine, we just don't do it automagically: print (string) $obj; regards, Derick -- PHP Internals - PHP Runtime De

Re: [PHP-DEV] __toString() with cast is broken in php5 RC1

2004-04-01 Thread Jevon Wright
ginal Message - From: "Marcus Boerger" <[EMAIL PROTECTED]> To: "David Giffin" <[EMAIL PROTECTED]> Cc: "Marcus Boerger" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Friday, April 02, 2004 12:27 PM Subject: Re: [PHP-DEV] __toString() with cast

Re: [PHP-DEV] __toString() with cast is broken in php5 RC1

2004-04-01 Thread Marcus Boerger
Hello David, generally the idea is to change this back. But i don't think we will be able to solve the related problems before PHP 5.1. marcus Friday, April 2, 2004, 2:03:38 AM, you wrote: > Hi Marcus, > Is this going to change back? The php5 documentation on the zend site > shows that both c

Re: [PHP-DEV] __toString() with cast is broken in php5 RC1

2004-04-01 Thread David Giffin
Hi Marcus, Is this going to change back? The php5 documentation on the zend site shows that both casting and print/echo should work. I guess people could use the output buffering methods to get the print data for the time being. A not so happy work around :( Thanks again, David On Fri, 2 Apr

Re: [PHP-DEV] __toString() with cast is broken in php5 RC1

2004-04-01 Thread Marcus Boerger
Hello David, that's correct. See the NEWS file, 3rd entry: 18 March 2004, PHP 5 Release Candidate 1 - Fixed numerous bugs with the just-in-time auto-global initialization, that could cause $_SERVER, $argv/$argc and other variables not to work properly. (Zeev) - Fixed data corruption with

[PHP-DEV] __toString() with cast is broken in php5 RC1

2004-04-01 Thread David Giffin
Hi There, I just got a chance tp update to PHP5 RC1 and noticed that some things have changed for the __toString method. It seems that it it only getting called when the object is printed or echo. Casting the object to a string returns the Object #. Here is an example: The Script: