xref: /PHP-7.3/Zend/tests/bug76965.phpt (revision f42d7bdd)
1--TEST--
2Bug #76965 (INI_SCANNER_RAW doesn't strip trailing whitespace)
3--FILE--
4<?php
5// the trailing whitespace is intentional
6$ini = <<<END
71="foo"
82="bar" ; comment
93= baz
104= "foo;bar"
115= "foo" ; bar ; baz
126= "foo;bar" ; baz
137= foo"bar ; "ok
14END;
15
16var_dump(parse_ini_string($ini, false, INI_SCANNER_RAW));
17?>
18===DONE===
19--EXPECT--
20array(7) {
21  [1]=>
22  string(3) "foo"
23  [2]=>
24  string(3) "bar"
25  [3]=>
26  string(3) "baz"
27  [4]=>
28  string(7) "foo;bar"
29  [5]=>
30  string(3) "foo"
31  [6]=>
32  string(7) "foo;bar"
33  [7]=>
34  string(7) "foo"bar"
35}
36===DONE===
37