Note. This will create the file even if it doesn't exist. It is also recommended that you call your ini files ini.php so they cannot be read through the browser.
Notice if you do
<?php write_php_ini(['mode'=>1],"settings.ini"); ?>
you can navigate to that file in the browser and read it, but with
<?php write_php_ini(['mode'=>1],"settings.ini.php"); ?>