1
0
mirror of https://github.com/php/php-src.git synced 2026-03-26 17:22:15 +01:00
Files
archived-php-src/ext/spl/examples/dba_dump.php
Marcus Boerger d8943e513c Update examples
2003-07-16 21:52:03 +00:00

28 lines
511 B
PHP
Executable File

<?php
/* dba dump utility
*
* Usage: php dba_dump <file> <handler> [<regex>]
*
* Show all groups in the ini file specified by <file>.
* The regular expression <regex> is used to filter the by setting name.
*
* Note: configure with --enable-dba
*
* (c) Marcus Boerger
*/
require_once("dba_reader.inc");
require_once("key_filter.inc");
$db = new dba_reader($argv[1], $argv[2]);
if ($argc>3) {
$db = new key_filter($db, $argv[3]);
}
foreach($db as $key => $val) {
echo "'$key' => '$val'\n";
}
?>