- Remove gen_rdata.php script that generated randomized function mappings - Remove ignore_constants.php file containing system constants filter list - Delete entire bin directory with PHP utility scripts for data generation - Remove automated PHP extension function scanning functionality - Remove constants filtering mechanism for predefined system constants - Clean up unused configuration generationmaster
parent
d1d362d779
commit
06023674fe
2 changed files with 0 additions and 82 deletions
@ -1,42 +0,0 @@ |
|||||||
<?php |
|
||||||
$dir = '/home/htf/workspace/c/php-8.0.12/ext/standard/'; |
|
||||||
|
|
||||||
$outDir = __DIR__ . '/../config/'; |
|
||||||
|
|
||||||
$funcs = []; |
|
||||||
$files = glob($dir . '*.c'); |
|
||||||
$index = 0; |
|
||||||
foreach ($files as $file) { |
|
||||||
$content = file_get_contents($file); |
|
||||||
preg_match_all('/PHP_FUNCTION\(([a-z0-9_]+)\)/i', $content, $match); |
|
||||||
if (empty($match[1])) { |
|
||||||
continue; |
|
||||||
} |
|
||||||
foreach ($match[1] as $fn) { |
|
||||||
$funcs[] = $fn; |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
shuffle($funcs); |
|
||||||
|
|
||||||
$_funcs = []; |
|
||||||
foreach ($funcs as $fn) { |
|
||||||
$_funcs['fn_' . random_int(100000, 999999) . str_pad($index++, 3, '0') . random_int(100, 999)] = $fn; |
|
||||||
} |
|
||||||
|
|
||||||
function dumpVar($file, $var) |
|
||||||
{ |
|
||||||
file_put_contents($file, "<?php\nreturn " . var_export($var, 1) . ";\n");
|
|
||||||
} |
|
||||||
|
|
||||||
dumpVar($outDir . 'functions.php', $_funcs); |
|
||||||
|
|
||||||
$constants = get_defined_constants(); |
|
||||||
$ignore_constants = array_flip(require __DIR__ . '/ignore_constants.php'); |
|
||||||
foreach ($constants as $k => $v) { |
|
||||||
if (isset($ignore_constants[$k])) { |
|
||||||
unset($constants[$k]); |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
dumpVar($outDir . 'constants.php', $constants); |
|
||||||
@ -1,40 +0,0 @@ |
|||||||
<?php |
|
||||||
return [ |
|
||||||
"PHP_SAPI", |
|
||||||
"PHP_OS", |
|
||||||
"PHP_OS_FAMILY", |
|
||||||
"PHP_ZTS", |
|
||||||
"PHP_MAXPATHLEN", |
|
||||||
"PHP_EOL", |
|
||||||
"PATH_SEPARATOR", |
|
||||||
"DIRECTORY_SEPARATOR", |
|
||||||
"PHP_BINDIR", |
|
||||||
"DEFAULT_INCLUDE_PATH", |
|
||||||
"PHP_LIBDIR", |
|
||||||
"PHP_VERSION", |
|
||||||
"PHP_VERSION_ID", |
|
||||||
'PEAR_INSTALL_DIR', |
|
||||||
'PEAR_EXTENSION_DIR', |
|
||||||
'PHP_EXTENSION_DIR', |
|
||||||
'PHP_PREFIX', |
|
||||||
'PHP_MANDIR', |
|
||||||
'PHP_DATADIR', |
|
||||||
'PHP_SYSCONFDIR', |
|
||||||
'PHP_LOCALSTATEDIR', |
|
||||||
'PHP_CONFIG_FILE_PATH', |
|
||||||
'PHP_CONFIG_FILE_SCAN_DIR', |
|
||||||
'PHP_BINARY', |
|
||||||
'LIBXML_VERSION', |
|
||||||
'LIBXML_DOTTED_VERSION', |
|
||||||
'LIBXML_LOADED_VERSION', |
|
||||||
'OPENSSL_VERSION_TEXT', |
|
||||||
'OPENSSL_VERSION_NUMBER', |
|
||||||
'OPENSSL_DEFAULT_STREAM_CIPHERS', |
|
||||||
'PCRE_VERSION', |
|
||||||
'PCRE_VERSION_MAJOR', |
|
||||||
'PCRE_VERSION_MINOR', |
|
||||||
'PCRE_JIT_SUPPORT', |
|
||||||
'STDIN', |
|
||||||
'STDOUT', |
|
||||||
'STDERR', |
|
||||||
]; |
|
||||||
Loading…
Reference in new issue