Re: params ext (was: Strict typing)

From: Date: Wed, 11 Aug 2010 18:32:50 +0000
Subject: Re: params ext (was: Strict typing)
References: 1 2 3 4 5 6 7 8 9 10  Groups: php.internals 
Request: Send a blank email to internals+get-49362@lists.php.net to get a copy of this message
Hi 2010/8/11 Stas Malyshev <smalyshev@sugarcrm.com>: > I like the idea, though it looks like this function is a re-implementation > of the engine parsing, which is not good. The function that actually reuses > the engine function would be much better. I did have a short peak at the code and yes I belive we could implement such a function relatively more simple than pecl/params > Ahother thing - for core I think it has to be named something like > func_parse_args() to be in line with func_get_args() etc. and some error > feedback (like, which parameter failed and why) wouldn't hurt. I thought the same, and then implementing it in zend_builtin_functions in line with the other func_*() utilities. > But having such thing in core would be very nice. Though it wouldn't solve > the current debate about types/params, since the whole idea is for it to > work without calling additional functions. Indeed it doesn't solve the current arguments for and against type hinting. But its a good step in the right direction for a better way to parse passed parameters from a library developer perspective. -- regards, Kalle Sommer Nielsen kalle@php.net

« previous php.internals (#49362) next »