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.

If not, I understand, and will leave that decision to the RM :)

- Davey




If the patch for some reason doesn't come through, I include it below, it's simple enough:

Index: ext/standard/basic_functions.c
===================================================================
RCS file: /repository/php-src/ext/standard/basic_functions.c,v
retrieving revision 1.725.2.31.2.64.2.45
diff -u -u -r1.725.2.31.2.64.2.45 basic_functions.c
--- ext/standard/basic_functions.c 3 Aug 2008 12:15:55 -0000 1.725.2.31.2.64.2.45
+++ ext/standard/basic_functions.c      3 Aug 2008 21:52:20 -0000
@@ -3510,6 +3510,7 @@
PHP_FE(stream_context_set_option, arginfo_stream_context_set_option) PHP_FE(stream_context_get_options, arginfo_stream_context_get_options) PHP_FE(stream_context_get_default, arginfo_stream_context_get_default) + PHP_FALIAS(stream_context_set_default, stream_context_get_default, arginfo_stream_context_get_default) PHP_FE(stream_filter_prepend, arginfo_stream_filter_prepend)
        PHP_FE(stream_filter_append,                                            
                                        arginfo_stream_filter_append)
        PHP_FE(stream_filter_remove,                                            
                                        arginfo_stream_filter_remove)


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

Reply via email to