Re: Re: cvs: php4 /ext/standard file.c

From: Date: Tue, 08 Apr 2003 17:03:26 +0000
Subject: Re: Re: cvs: php4 /ext/standard file.c
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-795@lists.php.net to get a copy of this message
I've considered this a few times; the thing that has stopped me from implementing it so far is that I'm not 100% sure if this is a good thing as it would become very much like having ini settings for each context option. This is something that *could* cause problems; if a pear class assumes the default has no special options set and then tries to open a file, it might possibly fail because some settings are turned on. I like the idea, I'm just not sure if I like the potential headache :/ --Wez. On Tue, 8 Apr 2003 pollita@php.net wrote: > There is one thing I wanted to discuss in that regard though... What do you > think of a "default context"? > > <?php > $opts = array(array(....)); > $context = stream_context_create($opts); > stream_context_default($context); > > /* All stream related functions [fopen, file_get_contents, readfile, file, > file_put_contents, etc...] will now use $context by default unless > explicitly overridden */ > ..... > ..... > ?>

« previous php.internals (#795) next »