Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:66902 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 29700 invoked from network); 3 Apr 2013 07:31:41 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 3 Apr 2013 07:31:41 -0000 Authentication-Results: pb1.pair.com smtp.mail=kalle.php@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=kalle.php@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.212.45 as permitted sender) X-PHP-List-Original-Sender: kalle.php@gmail.com X-Host-Fingerprint: 209.85.212.45 mail-vb0-f45.google.com Received: from [209.85.212.45] ([209.85.212.45:45833] helo=mail-vb0-f45.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 28/99-07534-CDADB515 for ; Wed, 03 Apr 2013 02:31:40 -0500 Received: by mail-vb0-f45.google.com with SMTP id w15so224637vbf.18 for ; Wed, 03 Apr 2013 00:31:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=t+kai+LYJ8+VLxroiyCeOsPaGvb2XsPnCNHfSvEf+H8=; b=ZP/V8pJv35bAyzlg7ojFIIQVmw/Y3orKCmP9n/ISjDQe9UmZ8fNco8OvayhbaARwLD ojvnDIecHw6oMUvosjPo7+nW+A2CED/FpmZ7O8hEIEOPFQdUPf2hzr3h37C+sPUq7QLi OspgO6LUnxuDRSGbEw0Tz0/nVEX41uAiGK6dTVQE9ndYLlR2ePyr968qJx4gOvW1+LYN mz/yZjBzOJGAx2+5/yJlHZhPcyeiJjYj+URzhE0GtT5GBhhVKF2jipkcMcx8XClpNMCx yurKRrB9d4Ts2bLbR8clrRFkyYTqdVNB7HlzKsFKSB8pkpApewPngjUrGj/DNgU9hWic k4Jg== MIME-Version: 1.0 X-Received: by 10.220.137.145 with SMTP id w17mr328027vct.73.1364974298203; Wed, 03 Apr 2013 00:31:38 -0700 (PDT) Sender: kalle.php@gmail.com Received: by 10.58.76.225 with HTTP; Wed, 3 Apr 2013 00:31:38 -0700 (PDT) In-Reply-To: References: Date: Wed, 3 Apr 2013 09:31:38 +0200 X-Google-Sender-Auth: ghj91EQlBSarNRY0qRqSrAmLH4Q Message-ID: To: Laruence Cc: PHP Internals Content-Type: text/plain; charset=ISO-8859-1 Subject: Re: [PHP-DEV] Add a constant to reflect --with-curlwrappers From: kalle@php.net (Kalle Sommer Nielsen) 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; } else { ob_start(); phpinfo(INFO_GENERAL); if(strpos('with-curlwrappers', ob_get_clean()) !== false) { $curlwrappers = true; } } What I'm saying is (like Hannes), adding a constant thats only gonna be available for one minor version, is not worth it, we lived years without it and we can live a little longer until it finally dies. Also, seeing you already added the constant, it should be named CURL_WRAPPERS_ENABLED, not ENABLE because it implies that its an option used in a write context, where this constant is purely meant to be used in a read context. -- regards, Kalle Sommer Nielsen kalle@php.net