Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:66903 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 31264 invoked from network); 3 Apr 2013 07:40:56 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 3 Apr 2013 07:40:56 -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 Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.217.176 as permitted sender) X-PHP-List-Original-Sender: hannes.magnusson@gmail.com X-Host-Fingerprint: 209.85.217.176 mail-lb0-f176.google.com Received: from [209.85.217.176] ([209.85.217.176:49209] helo=mail-lb0-f176.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id BF/E9-07534-70DDB515 for ; Wed, 03 Apr 2013 02:40:56 -0500 Received: by mail-lb0-f176.google.com with SMTP id y8so1273951lbh.21 for ; Wed, 03 Apr 2013 00:40:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=KmcHUv5nXRYSiVjj6jOjM+j6WCs1Qsxj4XhrXSZyNYk=; b=0jVkjerXL08w/5NjItxfDmuwmymZGi7Oh2Ab/d64D4AnX2UZzSQY3dwwsHxrk36Y+j KklJM74Ul+eO2rsCw3oC8FTd6caUcHzh9GWhNW4aXukDT/LrodGTiEgfrnnvCQ0ZssCx u+R/dBU5DdO47MDD1X42iIDozY76Kz86nrr23wOnd0KdE1sIWRiBzRnD7+KEJCRjijL8 tvGCfYTc3VZwIxM7tDc/8DQlOSSDvlUW+CLQ2tBldF77Y6qn6Jt9aV9BfrXtTYvIErWW kGTVQlAeByqn555tWmbZ+Gi9RHBk8n41v5UJlVSq0tI3jDeheuZevgUlvxexZb13rgv3 dCjA== MIME-Version: 1.0 X-Received: by 10.112.142.225 with SMTP id rz1mr499522lbb.104.1364974852519; Wed, 03 Apr 2013 00:40:52 -0700 (PDT) Received: by 10.114.38.33 with HTTP; Wed, 3 Apr 2013 00:40:52 -0700 (PDT) In-Reply-To: References: Date: Wed, 3 Apr 2013 00:40:52 -0700 Message-ID: To: Kalle Sommer Nielsen Cc: Laruence , PHP Internals Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] Add a constant to reflect --with-curlwrappers From: hannes.magnusson@gmail.com (Hannes Magnusson) On Wed, Apr 3, 2013 at 12:31 AM, Kalle Sommer Nielsen wrote: > Hi Laruence > > 2013/3/31 Laruence >> I propose to add a constant : bool CURL_WRAPPERS_ENABLE >> >> or, any other better name... >> >> objections? > > I'm a -1 on this, because as we sort of agreed on (like Hannes > implied), this experimental feature did not turn out as we wanted, its > buggy and nobody maintains it. Currently to figure out if PHP was > built with curlwrappers, theres this dirty hack by printing the > phpinfo() page into an output buffer, to parse it for the build > string, this sucks. > > However, since this is an experimental feature, we should either: > 1) Make it work (most unlikely) > 2) Remove it > > Instead of adding tiny hacks to make it easier (I know a constant wont > hurt much). Cross version code is also gonna end up with even more > clutter, imagine this (if you want to utilize this new constant, which > is the idea right?): > > $curlwrappers = false; > > if(defined('CURL_WRAPPERS_ENABLED')) { > $curlwrappers = true; You'll actually have to assign the value of CURL_WRAPPERS_ENABLED to $curlwrappers, as defined() only checks if the constant exist.. not if its set to true :) -Hannes