Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:39599 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 75877 invoked from network); 4 Aug 2008 07:49:46 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 4 Aug 2008 07:49:46 -0000 Authentication-Results: pb1.pair.com smtp.mail=hannes.magnusson@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=hannes.magnusson@gmail.com; sender-id=pass; domainkeys=bad Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.134.189 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: hannes.magnusson@gmail.com X-Host-Fingerprint: 209.85.134.189 mu-out-0910.google.com Received: from [209.85.134.189] ([209.85.134.189:22206] helo=mu-out-0910.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id D7/85-46562-A94B6984 for ; Mon, 04 Aug 2008 03:49:46 -0400 Received: by mu-out-0910.google.com with SMTP id i2so1710702mue.3 for ; Mon, 04 Aug 2008 00:49:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=0g33EDu2sEFjoIIOKQ9KpwKzrGgEh29ei1q7KS4BzpE=; b=jbolhI8RGHiHCvz0UnO1yeW9MsddKBe+xo15kZJp+M4DK0M4XB2cVERaE7okSsLyfu bbeKjbOp9S1F/OTc2XRe4HFGmBqacvWkoDV3ScNBFILYafgN3mke7FSaNQ31ZZj8/P6O rG0CwMLwY+OR8CX9BmrljYKXE8TBueRuuYwio= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=ahWq/FKdsykF5ULYFJI3WcXBsa/2RhNCblJ4SSxpEYKwg/uTDJ4SVVDboyNRFjty1P IV+aGC7GLOLqSD9OpZxgtZM8KoVFQAxb5jSCoxXogb4rK98T9H5M5+SCMYU32A84qE8k Zh8fGjh4Hi4X01+mkxfj2ukn8qlxneeEvBdsQ= Received: by 10.103.1.5 with SMTP id d5mr5379214mui.99.1217836183390; Mon, 04 Aug 2008 00:49:43 -0700 (PDT) Received: by 10.103.248.20 with HTTP; Mon, 4 Aug 2008 00:49:43 -0700 (PDT) Message-ID: <7f3ed2c30808040049w7172205ey4ae460be4beabcee@mail.gmail.com> Date: Mon, 4 Aug 2008 09:49:43 +0200 To: "Davey Shafik" Cc: internals@lists.php.net In-Reply-To: <220AF877-747F-4BDB-8631-235B54ED2503@php.net> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <220AF877-747F-4BDB-8631-235B54ED2503@php.net> Subject: Re: [PHP-DEV] [PATCH] Alias stream_context_get_default() as stream_context_set_default() From: hannes.magnusson@gmail.com ("Hannes Magnusson") On Mon, Aug 4, 2008 at 01:29, Davey Shafik 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