Hello Andrei,

Friday, November 28, 2003, 1:59:35 PM, you wrote:

> On Thu, 27 Nov 2003, Marcus Boerger wrote:
>> helly                Thu Nov 27 14:24:38 2003 EDT
>> 
>>   Modified files:              
>>     /ZendEngine2     zend_API.c 
>>   Log:
>>   Convert objects to string if string is required by newer parameter parsing
>>   since we do this for older parameter parsing does so too.

> Do you really think this is necessary? I can see the automatic
> object->string casting being useful for things like print(), but when a
> extension author expects a string, would it make sense to make the
> object convert itself? I mean the result will most likely be some
> internal object info represented as a string, and not something
> meaningful.

No, when the object does not offer a valid string conversion nothing will
change compared to what we had before. So the only thing done is that you
now can implement objects that can be used as strings like simplexml_element.
An extension like that cannot be programmed so elegant than without havin it.
Besides that we convert all other types automatially whereever we are and
objects offer an optional string conversion - so i thing we should use that
where the conversion would have been applied for other types and where it
makes sense - at least in the parameter parsing. If we don't do this i don't
understant why we did such a complex conversion facility at all. Also i see
confusion in the users. Why does print use conversion and sprintf not?



-- 
Best regards,
 Marcus                            mailto:[EMAIL PROTECTED]

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to