xref: /PHP-7.3/ext/standard/tests/file/bug63512.phpt (revision b746e698)
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--EXPECT--
17array(7) {
18  ["int"]=>
19  string(3) "123"
20  ["constant"]=>
21  string(12) "INSTALL_ROOT"
22  ["quotedString"]=>
23  string(6) "string"
24  ["a"]=>
25  string(18) "INSTALL_ROOT "waa""
26  ["b"]=>
27  string(12) "INSTALL_ROOT"
28  ["c"]=>
29  string(18) ""waa" INSTALL_ROOT"
30  ["d"]=>
31  string(27) "INSTALL_ROOT "INSTALL_ROOT""
32}
33