Hello Bob,

Tuesday, November 15, 2005, 11:30:18 PM, you wrote:

> Would objects be included in this "one consistent way to cast things"? The
> old zend_get_parameters API works since the calling function was responsible
> for the conversions, but in the newer zend_parse_parameters API they get
> filtered out by the case statement on what "types" to pass into the
> convert_to_ function. My reasons for this are selfish and I don't know that
> it benefits the community in large, but you guys had the foresight to build
> in the cast_object and get/set handlers to fully support objects internally,
> would be nice to be able to pass them to functions as well. 

> Right now, I also have to do the pre-cast to make it work with internal
> functions using the newer API to retrieve bool-long-double and arrays. And
> since PHP6 is moving completely to the newer API....I'm holding my breath to
> see what is done with the API to support objects since my extension is
> dependent on it.

On a second thoughts of matters i came to the conclusion that parsing api
should be changed to call conversion automatically *unless* a new parsing
flag is being used. Doing this change early in 6 will allow us to catch
errors early. And meybe give us a feeling whether we even want that for
5.1+ series.

> On a side note, are there instructions on how to PECL'ize an extension so I
> can release a first revision?

Get a pecl account and ask King Wez if you have trouble following the docs.
However i wouldn't suggest releasing a 1.0 version unless all is working as
you planned. You should start with a version that does not perfectly ready.

> Thanks

> Bob Silva





>> -----Original Message-----
>> From: Lukas Smith [mailto:[EMAIL PROTECTED]
>> Sent: Tuesday, November 15, 2005 12:44 PM
>> To: Rasmus Lerdorf
>> Cc: Wez Furlong; Jani Taskinen; internals@lists.php.net
>> Subject: Re: [PHP-DEV] date() behaviour changed in 5.1?
>> 
>> Rasmus Lerdorf wrote:
>> > Wez Furlong wrote:
>> >
>> >> I can't think of any case where you'd want to error out when given
>> >> '100 ' if it would accept '100' quite happily.
>> >>
>> >> I'd lean towards a single cast semantic for this, and remove that
>> >> strict checking flag from zend_parse_parameters(); lazy dynamic type
>> >> handling for primitive data types is one of the cornerstones of PHP
>> >> IMO.
>> >
>> >
>> > Yeah, I am leaning towards that as well.  I don't like the inconsistency
>> > between direct casting via (int) vs. zend_parse_parameter's strict
>> > casting.  It is much simpler to explain that functions will cast to the
>> > required parameter type and have one consistent way to cast things.
>> 
>> +1
>> 
>> this is really what i have come to expect from PHP
>> (which is why I never understood why we changed array_merge to not cast
>> null to an empty array back in PHP 5.0.0)
>> 
>> regards,
>> Lukas
>> 
>> --
>> PHP Internals - PHP Runtime Development Mailing List
>> To unsubscribe, visit: http://www.php.net/unsub.php




Best regards,
 Marcus

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

Reply via email to