summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTjerk Meesters <datibbaw@php.net>2014-08-30 18:18:42 +0800
committerTjerk Meesters <datibbaw@php.net>2014-09-01 22:04:25 +0800
commit1bf996b32427e6cac762aafc23bdac7c3c50715f (patch)
treec13f783f4b82d2d63a5412531c1ae78d842ab454
parent5270ee1aef83a4cd17dc1175052ab3b9da94717a (diff)
downloadphp-git-1bf996b32427e6cac762aafc23bdac7c3c50715f.tar.gz
Added test case
-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