Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:66943 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 38257 invoked from network); 4 Apr 2013 14:24:28 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 4 Apr 2013 14:24:28 -0000 Authentication-Results: pb1.pair.com smtp.mail=dor.tchizik@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=dor.tchizik@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.219.41 as permitted sender) X-PHP-List-Original-Sender: dor.tchizik@gmail.com X-Host-Fingerprint: 209.85.219.41 mail-oa0-f41.google.com Received: from [209.85.219.41] ([209.85.219.41:36922] helo=mail-oa0-f41.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 61/70-35962-B1D8D515 for ; Thu, 04 Apr 2013 09:24:27 -0500 Received: by mail-oa0-f41.google.com with SMTP id f4so2795454oah.28 for ; Thu, 04 Apr 2013 07:24:25 -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=LUxyUKWYLiMW4VX0ixOWXGqBwigSo28/g4MZOOP0KcI=; b=oywyVzSajGOh3sjF+qXtaChyICuIWnu/4XOqvBM0bityKWX/zO5LWtrShOTn6abdeG CvIksKFElswETmqXsrIGOt2HM1K6COw4tMsLMOPc931xo2nTSFmc0lGxKrPqt2j2crLU rxjSh8KG+eqNNAxZK0U6LzlxKqscRxjCsSvrt+beM4INA02bsvAZLd46+2eqXQXYLPOg HAXf4eZwz3DtFpG1txTQ7bwnvZcQFackGJN2A9eSUeNThPaDJHYp5rPOZJOuwyVGJH5E eCPSRgz45sNLb3lNSHdIazh8MHC0zqFLobDwS1RSUmeR8uqmrI3QA9RloaAPjk9MYD6E yLmA== MIME-Version: 1.0 X-Received: by 10.60.135.131 with SMTP id ps3mr3002683oeb.131.1365085465122; Thu, 04 Apr 2013 07:24:25 -0700 (PDT) Received: by 10.182.128.69 with HTTP; Thu, 4 Apr 2013 07:24:25 -0700 (PDT) Received: by 10.182.128.69 with HTTP; Thu, 4 Apr 2013 07:24:25 -0700 (PDT) In-Reply-To: References: Date: Thu, 4 Apr 2013 17:24:25 +0300 Message-ID: To: Julien Pauli Cc: PHP Internals Content-Type: multipart/alternative; boundary=047d7b33cde83cef6204d989ba21 Subject: Re: [PHP-DEV] Adding a way to retreive compile options at runtime From: dor.tchizik@gmail.com (Madara Uchiha) --047d7b33cde83cef6204d989ba21 Content-Type: text/plain; charset=ISO-8859-1 I'm having a hard time seeing production use cases for this. While it is a very good suggestion, and probably not too hard to implement, what benefit does it help you in an actual application outside the development stage? I'm in favor though, would probably have some uses during the development stage. On Apr 4, 2013 5:19 PM, "Julien Pauli" wrote: > Hello everybody, > > Today we talked about a way to detect --with-curlwrappers at runtime. > It is nowadays not possible easilly. > > Then , I remembered I once proposed to add a new function that could return > every ./configure options used to compile the runtime PHP the code is > beeing run on. > > We already have "php-config --configure-options", but that needs to exist > and that needs an exec() call. > We also already have phpinfo() which returns that, but not in a very fancy > way (we need to preg_ the output which is ugly and not very simple). > > Today, Seldaek proposed what I think is a cool way to solve this problem : > add a new parameter to phpinfo() function, which could return in an array > what it usually directly print throught the SAPI print() function (HTMLing > the output when needed). > > The use case would be : > > $output = phpinfo(INFO_GENERAL, true); > > var_dump($output); > /* something like > ['Debug Build' =>'no', 'Thread Safety'=>'yes', 'Configure > Command'=>['--enable-foo', '--with-config-file-scan-dir'=>'/etc' > ]] > > > As you can see, it is rather simple but would need some work as it is > better for the "Configure Command" to return an array with the options > instead of a big string ; easier to parse. > > Thoughts ? > > Julien.Pauli > --047d7b33cde83cef6204d989ba21--