1--TEST--
2Test parse_ini_file() function : variation: identical properties and values are not referenced.
3--CREDITS--
4Dave Kelsey <d_kelsey@uk.ibm.com>
5--FILE--
6<?php
7/* Prototype  : array parse_ini_file(string filename [, bool process_sections])
8 * Description: Parse configuration file
9 * Source code: ext/standard/basic_functions.c
10 * Alias to functions:
11 */
12
13echo "*** Testing parse_ini_file() : variation ***\n";
14$output_file = __FILE__.".ini";
15$iniFile = <<<FILE
16[section1]
17value1=original
18value2=original
19[section2]
20value1=original
21value2=different
22FILE;
23
24file_put_contents($output_file, $iniFile);
25
26$a = parse_ini_file($output_file, true);
27var_dump($a);
28$a['section1']['value1'] = 'changed';
29var_dump($a);
30
31unlink($output_file);
32?>
33===DONE===
34--EXPECT--
35*** Testing parse_ini_file() : variation ***
36array(2) {
37  ["section1"]=>
38  array(2) {
39    ["value1"]=>
40    string(8) "original"
41    ["value2"]=>
42    string(8) "original"
43  }
44  ["section2"]=>
45  array(2) {
46    ["value1"]=>
47    string(8) "original"
48    ["value2"]=>
49    string(9) "different"
50  }
51}
52array(2) {
53  ["section1"]=>
54  array(2) {
55    ["value1"]=>
56    string(7) "changed"
57    ["value2"]=>
58    string(8) "original"
59  }
60  ["section2"]=>
61  array(2) {
62    ["value1"]=>
63    string(8) "original"
64    ["value2"]=>
65    string(9) "different"
66  }
67}
68===DONE===
69