Re: __string_value() crashes with return

From: Date: Wed, 30 Aug 2000 18:09:44 +0000
Subject: Re: __string_value() crashes with return
References: 1 2 3 4  Groups: php.dev 
Request: Send a blank email to php-dev+get-31293@lists.php.net to get a copy of this message
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.
hm, for debugging purposes I can´t deny that you *could* fancy things with this (autoindentification), imagine you´ve downloaded a compiled php class, creating an instance and (I´m assuming that __string_value() is improved a bit :) ) new unkonwn_class() echo $obj; prints out this: " unkonwn_class version 2.4 author: zendi phpeev email: bug@dot.com public methods: hello() sends out a greeting "hello world" WTF($script) calculates the WTF-factor of a script public properties: foobar contains the complete binary representation of foobar" andré

« previous php.dev (#31293) next »