Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:39625 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 28259 invoked from network); 4 Aug 2008 11:14:40 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 4 Aug 2008 11:14:40 -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 72.14.220.158 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: 72.14.220.158 fg-out-1718.google.com Received: from [72.14.220.158] ([72.14.220.158:18679] helo=fg-out-1718.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 90/00-28228-E94E6984 for ; Mon, 04 Aug 2008 07:14:39 -0400 Received: by fg-out-1718.google.com with SMTP id 16so1385955fgg.23 for ; Mon, 04 Aug 2008 04:14:35 -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=aI4aLFGFKUGRlMB7dZCugUD7MLyXvOMupY3BxvPmRcM=; b=fle4pTqgjX1+DM7zRTMfq8vQXlT/upyppJvjd+Cro1/6d4VI9uqd/m1s9Cds0n6DMP SnFbwyAROtrvlc1X5kxBZBLIY8y3K6KlkFxLHpEayo98DY2zU3b/FGiq6hLBNNRx2yey I7egtSHpBGsw/srtODKNBd3g2StOqt1XXlf7I= 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=P3x6aT2FVDcO4XmkcqqJJu29qvPbdid5GjL/Gkj0r8JXy/Rl20rmEY8s7LEAGhZg8O tqVSrYc15KpDelUeacTwqd0j2aB6TouxZJnHz3EOxcjU5bMgjeUVJwR4hRnY2PEsB2z4 83HfpWGiJ8Tjh1+9xLwjarKr15PciphjA/jVE= Received: by 10.103.204.3 with SMTP id g3mr5518704muq.30.1217848475157; Mon, 04 Aug 2008 04:14:35 -0700 (PDT) Received: by 10.103.248.20 with HTTP; Mon, 4 Aug 2008 04:14:35 -0700 (PDT) Message-ID: <7f3ed2c30808040414y41f32ef6ka5a9396e027978d5@mail.gmail.com> Date: Mon, 4 Aug 2008 13:14:35 +0200 To: "=?ISO-8859-1?Q?Johannes_Schl=FCter?=" Cc: "Davey Shafik" , internals@lists.php.net In-Reply-To: <1217847749.4175.27.camel@goldfinger.johannes.nop> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <220AF877-747F-4BDB-8631-235B54ED2503@php.net> <7f3ed2c30808040049w7172205ey4ae460be4beabcee@mail.gmail.com> <1217847749.4175.27.camel@goldfinger.johannes.nop> 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 13:02, Johannes Schl=FCter wrote: > On Mon, 2008-08-04 at 09:49 +0200, Hannes Magnusson wrote: >> 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 doesn't really solve anything as the argument is optional. > > Adding a new function which enforces the parameter sounds way better > then a simple alias. I agree. > >> In >> fact, to me it reads like the default context would be reset to >> nothing. > > I hope not ... I'd expect it to return the current default context > unchanged, else that function certainly should be replaced.... Read the example again: $ctx =3D stream_context_*set*_default(); (using the "new alias") :) using stream_context_*get*_default() without passing context to it returns the default context. -Hannes