func.inc 423 B

123456789101112131415161718
  1. <?php
  2. function get_zlib_version()
  3. {
  4. $version = NULL;
  5. ob_start();
  6. phpinfo();
  7. $info = ob_get_contents();
  8. ob_end_clean();
  9. //if (preg_match(',zlib.*Compiled Version => (\d+\.\d+\.\d+),s', $info, $match)) {
  10. // $version = $match[1];
  11. if (preg_match(',zlib(?!.*libXML).*Compiled Version (=> |</).*(\d+\.\d+\.\d+?),sU', $info, $match)) {
  12. $version = $match[2];
  13. }
  14. return $version;
  15. }