com php-src: Added test case: ext/standard/tests/general_func tions/parse_ini_string_003.phpt

From: Date: Mon, 01 Sep 2014 14:04:25 +0000
Subject: com php-src: Added test case: ext/standard/tests/general_func tions/parse_ini_string_003.phpt
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-81329@lists.php.net to get a copy of this message
Commit: 1bf996b32427e6cac762aafc23bdac7c3c50715f Author: Tjerk Meesters <datibbaw@php.net> Sat, 30 Aug 2014 18:18:42 +0800 Parents: 5270ee1aef83a4cd17dc1175052ab3b9da94717a Branches: PHP-5.6 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=1bf996b32427e6cac762aafc23bdac7c3c50715f Log: Added test case Changed paths: A ext/standard/tests/general_functions/parse_ini_string_003.phpt Diff: 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 0000000..570570d --- /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

« previous php.cvs (#81329) next »