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/ini_groups.php | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100755 ext/spl/examples/ini_groups.php (limited to 'ext/spl/examples/ini_groups.php') diff --git a/ext/spl/examples/ini_groups.php b/ext/spl/examples/ini_groups.php new file mode 100755 index 0000000..5136911 --- /dev/null +++ b/ext/spl/examples/ini_groups.php @@ -0,0 +1,41 @@ + [\] + * + * Show all groups in the ini file specified by \. + * The regular expression \ is used to filter the result. + * + * Note: configure with --enable-dba + */ + +if ($argc < 2) { + echo << [] + +Show all groups in the ini file specified by . +The regular expression is used to filter the result. + + +EOF; + exit(1); +} + +if (!class_exists("KeyFilter", false)) require_once("keyfilter.inc"); +if (!class_exists("IniGroups", false)) require_once("inigroups.inc"); + +$it = new IniGroups($argv[1]); +if ($argc>2) { + $it = new KeyFilter($it, $argv[2]); +} + +foreach($it as $group) { + echo "$group\n"; +} + +?> \ No newline at end of file -- cgit v1.2.1