#!/usr/bin/php # Credit to: https://github.com/jnweiger 3) { # append [] to the key name, if you need to pass an array object. if (substr($argv[2], -2) === '[]') { $CONFIG[substr($argv[2],0,-2)] = array_slice($argv,3); } else { $CONFIG[$argv[2]] = $argv[3]; } } else { # exactly two parameter given -- means delete. unset($CONFIG[$argv[2]]); } $text = var_export($CONFIG, true); ## A warning is printed, if argv[1] is not writable. ## PHP does not issue proper errno or strerror() does it? file_put_contents($argv[1], "