- parse_ini_file: documentation ( source)
- print_r: documentation ( source)
- file_put_contents: documentation ( source)
<?php
$file = '/tmp/FOO2AsD16';
file_put_contents($file, '
foo=bar
# This line is discarded by all versions of PHP
#hashkey=undefined_behaviour
; This is a real comment
;commented_out_key=documented_behaviour
baz=quux
');
print_r( parse_ini_file($file) );