<?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) );
Deprecated: Comments starting with '#' are deprecated in /tmp/FOO2AsD16 on line 3 in /in/AoI5H on line 13
Deprecated: Comments starting with '#' are deprecated in /tmp/FOO2AsD16 on line 4 in /in/AoI5H on line 13
Array
(
[foo] => bar
[baz] => quux
)
Output for 4.4.5 - 4.4.9
Fatal error: Call to undefined function: file_put_contents() in /in/AoI5H on line 4
Process exited with code 255.
Output for 4.3.2 - 4.3.11, 4.4.0 - 4.4.4
Fatal error: Call to undefined function: file_put_contents() in /in/AoI5H on line 4
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Call to undefined function: file_put_contents() in /in/AoI5H on line 4