summaryrefslogtreecommitdiff
path: root/ext/standard/tests/general_functions/parse_ini_booleans.phpt
blob: 7b012c50f6e9db32b28760124ebb2e813cb7fa62 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
--TEST--
parse_ini_file() boolean operators
--FILE--
<?php

$ini_file = dirname(__FILE__)."/parse_ini_booleans.data";

var_dump(parse_ini_file($ini_file, 1));

echo "Done.\n";

?>
--EXPECTF--	
array(3) {
  ["error_reporting values"]=>
  array(6) {
    ["foo"]=>
    string(7) "32767 8"
    ["error_reporting"]=>
    string(5) "32767"
    ["error_reporting1"]=>
    string(4) "4177"
    ["error_reporting2"]=>
    string(5) "32759"
    ["error_reporting3"]=>
    string(5) "32759"
    ["error_reporting4"]=>
    string(5) "32759"
  }
  ["true or false"]=>
  array(8) {
    ["bool_true"]=>
    string(1) "1"
    ["bool_yes"]=>
    string(1) "1"
    ["bool_on"]=>
    string(1) "1"
    ["bool_false"]=>
    string(0) ""
    ["bool_off"]=>
    string(0) ""
    ["bool_no"]=>
    string(0) ""
    ["bool_none"]=>
    string(0) ""
    ["bool_null"]=>
    string(0) ""
  }
  ["strings"]=>
  array(8) {
    ["string_true"]=>
    string(4) "true"
    ["string_yes"]=>
    string(4) " yes"
    ["string_on"]=>
    string(5) "  on "
    ["string_false"]=>
    string(5) "false"
    ["string_off"]=>
    string(4) "Off "
    ["string_no"]=>
    string(4) "No	 "
    ["string_none"]=>
    string(5) " NoNe"
    ["string_null"]=>
    string(4) "NULl"
  }
}
Done.