1--TEST-- 2parse_ini_file() boolean operators 3--FILE-- 4<?php 5 6$ini_file = __DIR__."/parse_ini_booleans.data"; 7 8var_dump(parse_ini_file($ini_file, 1)); 9 10echo "Done.\n"; 11 12?> 13--EXPECT-- 14array(3) { 15 ["error_reporting values"]=> 16 array(6) { 17 ["foo"]=> 18 string(7) "32767 8" 19 ["error_reporting"]=> 20 string(5) "32767" 21 ["error_reporting1"]=> 22 string(4) "4177" 23 ["error_reporting2"]=> 24 string(5) "32759" 25 ["error_reporting3"]=> 26 string(5) "32759" 27 ["error_reporting4"]=> 28 string(5) "32759" 29 } 30 ["true or false"]=> 31 array(8) { 32 ["bool_true"]=> 33 string(1) "1" 34 ["bool_yes"]=> 35 string(1) "1" 36 ["bool_on"]=> 37 string(1) "1" 38 ["bool_false"]=> 39 string(0) "" 40 ["bool_off"]=> 41 string(0) "" 42 ["bool_no"]=> 43 string(0) "" 44 ["bool_none"]=> 45 string(0) "" 46 ["bool_null"]=> 47 string(0) "" 48 } 49 ["strings"]=> 50 array(8) { 51 ["string_true"]=> 52 string(4) "true" 53 ["string_yes"]=> 54 string(4) " yes" 55 ["string_on"]=> 56 string(5) " on " 57 ["string_false"]=> 58 string(5) "false" 59 ["string_off"]=> 60 string(4) "Off " 61 ["string_no"]=> 62 string(4) "No " 63 ["string_none"]=> 64 string(5) " NoNe" 65 ["string_null"]=> 66 string(4) "NULl" 67 } 68} 69Done. 70