SPL-StandardPHPLibrary
dba_dump.php
Go to the documentation of this file.
1 <?php
2 
17 if ($argc < 3) {
18  echo <<<EOF
19 Usage: php ${_SERVER['PHP_SELF']} <file> <handler> [<regex>]
20 
21 Show all groups in the ini file specified by <file>.
22 The regular expression <regex> is used to filter the by setting name.
23 
24 
25 EOF;
26  exit(1);
27 }
28 
29 if (!class_exists("DbaReader", false)) require_once("dbareader.inc");
30 if (!class_exists("KeyFilter", false)) require_once("keyfilter.inc");
31 
32 $db = new DbaReader($argv[1], $argv[2]);
33 
34 if ($argc>3) {
35  $db = new KeyFilter($db, $argv[3]);
36 }
37 
38 foreach($db as $key => $val) {
39  echo "'$key' => '$val'\n";
40 }
41 
42 ?>
$db
Definition: dba_dump.php:32
This implements a DBA Iterator.
Definition: dbareader.inc:17
Regular expression filter for string iterators.
Definition: keyfilter.inc:22