Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:39636 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 23514 invoked from network); 4 Aug 2008 17:15:10 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 4 Aug 2008 17:15:10 -0000 Authentication-Results: pb1.pair.com smtp.mail=dshafik@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=dshafik@gmail.com; sender-id=pass; domainkeys=bad Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.198.233 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: dshafik@gmail.com X-Host-Fingerprint: 209.85.198.233 rv-out-0506.google.com Received: from [209.85.198.233] ([209.85.198.233:58285] helo=rv-out-0506.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 5D/10-22351-D1937984 for ; Mon, 04 Aug 2008 13:15:10 -0400 Received: by rv-out-0506.google.com with SMTP id g37so2039346rvb.23 for ; Mon, 04 Aug 2008 10:15:07 -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=TogPAbetD0ZYaWOdPzj1SgDQ55dXegTKVfpvXYmY8rM=; b=HCIa0Kemel2Wd7vJP9AEBks2Tbr3cQk0sLknV3HKgeLOp1BvdESxV3icMO4Qa0bhT9 BJIpApqTmezfiVk/+v1ByIZOKYoOBEI4Hw2XGe6Skf5zwlPtoEyp/6nnUNAXj8DT/mk9 6G4DQIoMP5CQM+TNJEB6PQRl+xuaRvekJd27w= 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=pBXsEnf313/63ka4prSRjFGTGZ1ezDrX9EghfM764H839n8q5jqSdf2F4XcfZK9rJu kQZ0Mt3sbkcRqxctHyUPPaPHWBoGUVXpoqJ9zqhzdAFGw/32sFxzUspVdKiLvJ5gLcRS rYNVfvgt7R0RfRVf8ipA9YXIwMGrgSbv49hUA= Received: by 10.140.192.9 with SMTP id p9mr7650461rvf.193.1217870107226; Mon, 04 Aug 2008 10:15:07 -0700 (PDT) Received: by 10.140.139.2 with HTTP; Mon, 4 Aug 2008 10:15:07 -0700 (PDT) Message-ID: <11ecc3310808041015p48392803pa2334d601a838073@mail.gmail.com> Date: Mon, 4 Aug 2008 13:15:07 -0400 To: "Hannes Magnusson" Cc: "=?ISO-8859-1?Q?Johannes_Schl=FCter?=" , "Davey Shafik" , internals@lists.php.net In-Reply-To: <7f3ed2c30808040414y41f32ef6ka5a9396e027978d5@mail.gmail.com> 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> <7f3ed2c30808040414y41f32ef6ka5a9396e027978d5@mail.gmail.com> Subject: Re: [PHP-DEV] [PATCH] Alias stream_context_get_default() as stream_context_set_default() From: dshafik@gmail.com ("Davey Shafik") I'll see if I can write this as a patch instead; I was trying for "path of least resistance" Should be a fun exercise for me! Will get to it tonight. - Davey On Mon, Aug 4, 2008 at 7:14 AM, Hannes Magnusson wrote: > On Mon, Aug 4, 2008 at 13:02, Johannes Schl=FCter wrot= e: >> 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 >