PHP_CompatInfo
[ class tree: PHP_CompatInfo ] [ index: PHP_CompatInfo ] [ all elements ]

Source for file updateVersionInfo.php

Documentation is available at updateVersionInfo.php

  1. <?php
  2. require 'c:\web\php-cvs\pear\PHP_CompatInfo\data\func_array.php';
  3.  
  4. $xml = simplexml_load_file('c:\web\php-cvs\phpdoc\xsl\version.xml');
  5.  
  6. foreach ($xml->function as $function) {
  7. $name = (string) $function['name'];
  8. $version = false;
  9. if (preg_match('/= (\d\.\d\.\d)/', (string) $function['from'], $matches)) {
  10. $funcs[$name]['init'] = $matches[1];
  11. continue;
  12. } elseif (preg_match('/(\d\.\d\.\d) - (\d\.\d\.\d) only/', (string) $function['from'], $matches)) {
  13. $funcs[$name]['init'] = $matches[1];
  14. continue;
  15. } else {
  16. if (strpos($function['from'], '3') !== FALSE) {
  17. $funcs[$name]['init'] = "3.0.0";
  18. continue;
  19. }
  20. if (strpos($function['from'], '4') !== FALSE) {
  21. $funcs[$name]['init'] = "4.0.0";
  22. continue;
  23. }
  24. if (strpos($function['from'], '5') !== FALSE) {
  25. $funcs[$name]['init'] = "5.0.0";
  26. continue;
  27. }
  28. }
  29. }
  30.  
  31. $txt = file('c:\web\php-cvs\phpdoc\funclist.txt');
  32.  
  33. for ($i = 0; $i < sizeof($txt); $i++) {
  34. if (strpos($txt[$i], '#') !== FALSE) {
  35. if (strpos(strtolower($txt[$i]), 'zend') !== FALSE) {
  36. $module = 'zend';
  37. } else {
  38. preg_match('@# php-src/(ext|sapi)/(.*?)/.*@', $txt[$i], $matches);
  39. $module = $matches[1] .'_'. $matches[2];
  40. }
  41. $i += 1;
  42. while (strpos($txt[$i], '#') === FALSE && ($i < sizeof($txt))) {
  43. if ($txt[$i] != '') {
  44. $name = trim($txt[$i]);
  45. if (!isset($funcs[$name]['ext'])) {
  46. $funcs[$name]['ext'] = $module;
  47. }
  48. }
  49. $i += 1;
  50. }
  51. $i -= 1;
  52. }
  53. }
  54.  
  55. foreach ($funcs as $key => $function) {
  56. if (!isset($function['init']) || ($function['init'] == '')) {
  57. $funcs[$key]['init'] = '5-dev';
  58. }
  59. if ($function['init']{0} == 3) {
  60. unset($funcs[$key]);
  61. }
  62. }
  63.  
  64. unset($funcs[""]);
  65.  
  66. file_put_contents('c:\web\php-cvs\pear\PHP_CompatInfo\data\func_array.php',
  67. "<?php
  68. # This file is generated!
  69. \$funcs = " .var_export($funcs, true). "
  70. ?>");
  71. ?>

Documentation generated on Sat, 05 Mar 2005 20:00:56 -0500 by phpDocumentor 1.3.0RC3