I have a file called address.php with a few functions in it. I want to call a specific function in that file from the command line. How?
The name of the function is
You can make your file "somefile.php" organized as follows:
function func1(){....}
function func2(){....}
function func3(){....}
....
foreach ($argv AS $arg){
function_exists($arg) AND call_user_func($arg);
}
Then from the command line or a Linux cronjob, you run the following command:
php /path/to/somefile.php arg1 arg2 arg3 ...