Re: Add a constant to reflect --with-curlwrappers

From: Date: Wed, 03 Apr 2013 07:40:52 +0000
Subject: Re: Add a constant to reflect --with-curlwrappers
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-66903@lists.php.net to get a copy of this message
On Wed, Apr 3, 2013 at 12:31 AM, Kalle Sommer Nielsen <kalle@php.net> wrote: > Hi Laruence > > 2013/3/31 Laruence <laruence@php.net> >> 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

« previous php.internals (#66903) next »