You are here

function ldap_help_parsePHPModules in Lightweight Directory Access Protocol (LDAP) 7.2

Same name in this branch
  1. 7.2 ldap_help/ldap_help.status.inc \ldap_help_parsePHPModules()
  2. 7.2 ldap_help/ldap_test_script/functions.inc \ldap_help_parsePHPModules()
Same name and namespace in other branches
  1. 8.2 ldap_help/ldap_help.status.inc \ldap_help_parsePHPModules()
  2. 8.2 ldap_help/ldap_test_script/functions.inc \ldap_help_parsePHPModules()
  3. 7 ldap_help/ldap_help.status.inc \ldap_help_parsePHPModules()
  4. 7 ldap_help/ldap_test_script/functions.inc \ldap_help_parsePHPModules()

Parse php modules from phpinfo .

2 calls to ldap_help_parsePHPModules()
ldap_help_status in ldap_help/ldap_help.status.inc
test.php in ldap_help/ldap_test_script/test.php

File

ldap_help/ldap_test_script/functions.inc, line 185

Code

function ldap_help_parsePHPModules() {
  ob_start();
  phpinfo(INFO_MODULES);
  $s = ob_get_contents();
  ob_end_clean();
  $matches = [];
  preg_match_all("/(\nLDAP Support.*Vendor Version[^\n]*?).*\$/iDsU", $s, $matches);
  return isset($matches[1][0]) ? "\nphpinfo() LDAP Info:" . $matches[1][0] : '';
}