Hi -
Andi Gutmans wrote:
Just to clarify, this is only for internal classes like Exception,
right? Userland __toString() will continue to be invoked when an
explicit (string) cast (or concat, etc.) is used, correct?
Wrong. The only time userland __toString() will be invoked will be in
print/
At 11:05 AM 3/17/2004 -0500, Hans Lellelid wrote:
Hi Andi,
Quick question -
Andi Gutmans wrote:
Marcus and rest,
Zeev and I took a long look at the whole __toString() issue. There is a
problem today that make_printabl_zval() is being called in many places,
some of which can't cope with a user-l
Hi Andi,
Quick question -
Andi Gutmans wrote:
Marcus and rest,
Zeev and I took a long look at the whole __toString() issue. There is a
problem today that make_printabl_zval() is being called in many places,
some of which can't cope with a user-land __toString() being called. In
order to suppo
Marcus and rest,
Zeev and I took a long look at the whole __toString() issue. There is a
problem today that make_printabl_zval() is being called in many places,
some of which can't cope with a user-land __toString() being called. In
order to support this we will have to do a complete restructur
At 09:49 AM 3/17/2004 +0100, Marcus Boerger wrote:
Hello Andi,
the problem is that we have many classes that the handler table to behave
mostly like a default php object. We'd need to manually set the cast handler
for all of them.
Yes, that is correct. Don't forget that cast_object() can not call
Hello Andi,
the problem is that we have many classes that the handler table to behave
mostly like a default php object. We'd need to manually set the cast handler
for all of them.
marcus
Wednesday, March 17, 2004, 9:45:26 AM, you wrote:
> The Exception class should support cast_object(). I don'
The Exception class should support cast_object(). I don't see why we need
to add extra flags.
Andi
At 11:45 PM 3/16/2004 +0100, Marcus Boerger wrote:
Hello Timm, hello Andi,
i htought i had a better solution to the __toString() problem.
But then i found out why we made it so complex. The reason
> Hello Timm, hello Andi,
well i forgot to mentione a problem description: Some internal classes
copy the standard handler table. And hence their cast handler is set to
NULL. This we need to avoid. But still standard objects may not be
converted to strings everywhere.
> i htought i had a better s
Hello Timm, hello Andi,
i htought i had a better solution to the __toString() problem.
But then i found out why we made it so complex. The reason IIRC
was to prevent __toString() being called everywhere automatically
when it is a user function.
Havin said this the solution is very easy. We expand
Hi,
Both of the following examples used to output the
Exception::__toString() output, which they don't anymore:
$ php-dev -r '$e= new Exception(); echo $e, "\n";'
Object id #1
$ php-dev -r '$e= new Exception(); echo (string)$e, "\n";'
Object id #1
Works fine for userland objects:
$ php-dev -r
10 matches
Mail list logo