From c4dd7a1a684490673e25aaf4fabec5df138854c4 Mon Sep 17 00:00:00 2001 From: Lorry Tar Creator Date: Thu, 14 Mar 2013 05:42:27 +0000 Subject: Imported from /home/lorry/working-area/delta_php2/php-5.4.13.tar.bz2. --- ext/spl/examples/dba_dump.php | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100755 ext/spl/examples/dba_dump.php (limited to 'ext/spl/examples/dba_dump.php') diff --git a/ext/spl/examples/dba_dump.php b/ext/spl/examples/dba_dump.php new file mode 100755 index 0000000..2c698d4 --- /dev/null +++ b/ext/spl/examples/dba_dump.php @@ -0,0 +1,42 @@ + \ [\] + * + * Show all groups in the ini file specified by \. + * The regular expression \ is used to filter the by setting name. + * + * Note: configure with --enable-dba + */ + +if ($argc < 3) { + echo << [] + +Show all groups in the ini file specified by . +The regular expression is used to filter the by setting name. + + +EOF; + exit(1); +} + +if (!class_exists("DbaReader", false)) require_once("dbareader.inc"); +if (!class_exists("KeyFilter", false)) require_once("keyfilter.inc"); + +$db = new DbaReader($argv[1], $argv[2]); + +if ($argc>3) { + $db = new KeyFilter($db, $argv[3]); +} + +foreach($db as $key => $val) { + echo "'$key' => '$val'\n"; +} + +?> \ No newline at end of file -- cgit v1.2.1