xref: /PHP-8.1/ext/standard/tests/file/bug63512.phpt (revision 7aacc705)
1--TEST--
2Fixed bug #63512 (parse_ini_file() with INI_SCANNER_RAW removes quotes from value).
3--FILE--
4<?php
5
6$array = parse_ini_string('
7        int = 123
8        constant = INSTALL_ROOT
9        quotedString = "string"
10        a = INSTALL_ROOT "waa"
11        b = "INSTALL_ROOT"
12        c = "waa" INSTALL_ROOT
13        d = INSTALL_ROOT "INSTALL_ROOT"', false, INI_SCANNER_RAW);
14
15var_dump($array);
16?>
17--EXPECT--
18array(7) {
19  ["int"]=>
20  string(3) "123"
21  ["constant"]=>
22  string(12) "INSTALL_ROOT"
23  ["quotedString"]=>
24  string(6) "string"
25  ["a"]=>
26  string(18) "INSTALL_ROOT "waa""
27  ["b"]=>
28  string(12) "INSTALL_ROOT"
29  ["c"]=>
30  string(18) ""waa" INSTALL_ROOT"
31  ["d"]=>
32  string(27) "INSTALL_ROOT "INSTALL_ROOT""
33}
34