summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/standard/tests/general_functions/parse_ini_string_003.phpt40
1 files changed, 40 insertions, 0 deletions
diff --git a/ext/standard/tests/general_functions/parse_ini_string_003.phpt b/ext/standard/tests/general_functions/parse_ini_string_003.phpt
new file mode 100644
index 0000000000..570570dbfe
--- /dev/null
+++ b/ext/standard/tests/general_functions/parse_ini_string_003.phpt
@@ -0,0 +1,40 @@
+--TEST--
+parse_ini_string() typed scanner mode
+--FILE--
+<?php
+
+$contents = <<<EOS
+foo = 1
+bar = 1.3
+baz = null
+qux[] = false
+qux[] = off
+qux[] = something
+qux[] = "something else"
+EOS;
+
+var_dump(parse_ini_string($contents, false, INI_SCANNER_TYPED));
+
+?>
+Done
+--EXPECTF--
+array(4) {
+ ["foo"]=>
+ int(1)
+ ["bar"]=>
+ float(1.3)
+ ["baz"]=>
+ NULL
+ ["qux"]=>
+ array(4) {
+ [0]=>
+ bool(false)
+ [1]=>
+ bool(false)
+ [2]=>
+ string(9) "something"
+ [3]=>
+ string(14) "something else"
+ }
+}
+Done