PHP Function cli_Set_Process_Title
The php function cli_set_process_title is used to change the process title visible in tools like top and ps. It is only effective if you use php in CLI mode.
PHP has many built-in functions that can be used in a script to perform a specific task. You can also create your own custom functions. A function is a block of code that will only be executed when the function is called. Functions are a great way to reuse code and help you write more efficient scripts.
There are many different programming languages out there to choose from when writing general-purpose scripts, including bash, python and perl (once called "the duct tape of the internet"). In this series of articles we'll be looking at how to build command line scripts in php. This is part one.
The php function get_defined_functions() returns a multidimensional array containing a list of all the functions that have been defined in your script. The array will contain the internal functions as well as any user-defined functions. If you don't want to see any user-defined functions in the return array, simply specify an empty string as the second argument of the function call. You can also use the optional third argument to filter out certain types of functions from the result. For example, you can filter out functions that accept integers only. This will prevent the function call from generating an error when the input is not int-compatible with PHP.