On Mon, Aug 4, 2008 at 01:29, Davey Shafik <[EMAIL PROTECTED]> wrote:
> Hey,
>
> it has come to my attention that stream_context_get_default() is /grossly/
> misnamed, considering
> that it can be used (and is the only way) to SET default options. It works
> more like ini_set() in that
> you pass in the new defaults and it returns the old.
>
> With the current name, it is as bad as if we added an optional argument to
> ini_get() that would also
> set the value.
>
> I know we're already into PHP 5.3 alpha, but this is a simple alias, so I'm
> hoping you can squeeze it in.

That doesn't really solve anything as the argument is optional. In
fact, to me it reads like the default context would be reset to
nothing.

$ctx = stream_context_set_default();
Doesn't look any less weird than stream_context_get_default($ctx);

I do agree though. The naming convention of the stream_*() functions
are extremely bad.

-Hannes

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

Reply via email to