mirror of
https://github.com/php/php-src.git
synced 2024-10-13 20:42:38 +00:00
21 lines
477 B
PHP
21 lines
477 B
PHP
|
<?php
|
||
|
|
||
|
$reg = new PEAR_Registry;
|
||
|
$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']);
|
||
|
}
|
||
|
|
||
|
?>
|