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 : <?php $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