Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:66942 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 36673 invoked from network); 4 Apr 2013 14:18:58 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 4 Apr 2013 14:18:58 -0000 Authentication-Results: pb1.pair.com smtp.mail=julienpauli@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=julienpauli@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.212.46 as permitted sender) X-PHP-List-Original-Sender: julienpauli@gmail.com X-Host-Fingerprint: 209.85.212.46 mail-vb0-f46.google.com Received: from [209.85.212.46] ([209.85.212.46:42695] helo=mail-vb0-f46.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 66/10-35962-1DB8D515 for ; Thu, 04 Apr 2013 09:18:58 -0500 Received: by mail-vb0-f46.google.com with SMTP id 11so1298911vbe.19 for ; Thu, 04 Apr 2013 07:18:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:mime-version:sender:from:date:x-google-sender-auth :message-id:subject:to:content-type; bh=DmypmienqxBmFxdrgIphP6GwSNlZBU2xLuDKP3jztRA=; b=KGTL8oyNN6bBdwzJjvye+7UBBSg31jDD7i3BoDMzl89e8oblPy4vv68OVeyfjY1yVy bw1V5/UGyTV7SSKzXeSpY6XbrUBNE8H2gkTT8/klKEgwQjCjC1JjPYf1paPUqefEPKWu tPXiQb5eb3t24m1he5jf6/Yq1WZLOjLyBsHefppfvyJxHN4wifxRrq4iZWGVZOWHMDdj WhkCDuEyRqL9IxPsGI/HmUhISDsA6PDhaJnjIvk19pvpfwrKV3WdpxkUgACK3saMnm6D xv6jllGF+WteLI7F/7GQkOxO4PfmEabmKnGWujsow1R1plRV349VKzzKE0RX0Gp5LH1F fplg== X-Received: by 10.52.171.193 with SMTP id aw1mr4167686vdc.49.1365085135146; Thu, 04 Apr 2013 07:18:55 -0700 (PDT) MIME-Version: 1.0 Sender: julienpauli@gmail.com Received: by 10.221.9.133 with HTTP; Thu, 4 Apr 2013 07:18:15 -0700 (PDT) Date: Thu, 4 Apr 2013 16:18:15 +0200 X-Google-Sender-Auth: siE35GAdxwu-rxpsT7N69-e3CBE Message-ID: To: PHP Internals Content-Type: multipart/alternative; boundary=089e0158b6c491aa7704d989a66c Subject: Adding a way to retreive compile options at runtime From: jpauli@php.net (Julien Pauli) --089e0158b6c491aa7704d989a66c Content-Type: text/plain; charset=ISO-8859-1 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 : '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 --089e0158b6c491aa7704d989a66c--