Re: __string_value() crashes with return

From: Date: Wed, 30 Aug 2000 17:52:07 +0000
Subject: Re: __string_value() crashes with return
References: 1 2 3  Groups: php.dev 
Request: Send a blank email to php-dev+get-31285@lists.php.net to get a copy of this message
At 16:18 30/08/00 +0200, thies@digicol.de wrote:
On Wed, Aug 30, 2000 at 04:12:38PM +0200, André Langhorst wrote:
Aren´t one allowed to have return in __string_value()?
you should return string-only! btw, return $this produces nice string-patterns (sometimes returning crashes, eg. property of some object) :) I´d say you should follow the rules and write some 'string' into it, even variables are not allowed I suppose
    i'm for removing the __string_value() call alltogether!
I also think it should be removed. I think the user shouldn't have a problem to write print $obj->string_value() instead of print $obj;. It is confusing especially as it only works with "print" and not throughout PHP. And I really, as discussed on php-dev, don't want to see this propogate all of PHP. Andi --- Andi Gutmans <andi@zend.com> http://www.zend.com/

« previous php.dev (#31285) next »