[EMAIL PROTECTED] (Marcus Börger) wrote: > Here's a strip down version which uses the function name "toString". > http://marcus-boerger.de/php/ext/ze2/ze2-tostring-20030902.diff.txt > > As you can see it would now require every object implementing that function. > However the idea behind is that the cast handler should verify if a certain > interface was implemented and only then call that function which must then > be present. But the interface registering stuff is still missing (part of > the bigger patch - so i skipped that part for now).
First, I think we'd better use 1(TRUE) / 0(FALSE) instead SUCCESS / FAILURE for its return value because those two have different semantics. And requiring a certain interface would be more accurate for canonical OO programming, but I suppose it's not requisite for scripting languages. > The intersting point though is the cnage of the cast handler in c. It now > allows to support only selected conversions as already stated. It's just one of my trivial ideas, that why don't us make it capable of arbitrary casting operation rather than limiting it just for string casts? Moriyoshi -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php