mirror of
https://github.com/php/php-src.git
synced 2024-10-13 12:32:38 +00:00
20 lines
489 B
PHP
20 lines
489 B
PHP
<?php
|
|
|
|
$reg = new PEAR_Registry($script_dir);
|
|
$installed = $reg->packageInfo();
|
|
$i = $j = 0;
|
|
heading("Installed packages:");
|
|
foreach ($installed as $package) {
|
|
if ($i++ % 20 == 0) {
|
|
if ($j++ > 0) {
|
|
print "\n";
|
|
}
|
|
printf("%-20s %-10s %s\n",
|
|
"Package", "Version", "State");
|
|
print str_repeat("-", 75)."\n";
|
|
}
|
|
printf("%-20s %-10s %s\n", $package['package'],
|
|
$package['version'], $package['release_state']);
|
|
}
|
|
|
|
?>
|