What are the useful functions of php
This article mainly explains "what are the useful functions of php". The content of the explanation in the article is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn what useful functions php has.
Php interesting functions are: 1, cli_set_process_title function; 2, memory_get_peak_usage function; 3, memory_get_usage function; 4, get_cfg_var function and so on.
This article operating environment: windows7 system, PHP7.1 version, DELL G3 computer
What are the interesting functions of php?
Php has some interesting functions:
Cli_set_process_title ('abcd'); give the current php process a famous name
Echo cli_get_process_title (); gets the name of the current php process
It only works on php-cli.
The memory_get_peak_usage () function returns the peak memory usage
Memory_get_usage () returns the amount of memory currently allocated to the PHP script
Get_cfg_var ('error_reporting'); get the value of the PHP configuration option
Get_current_user () gets the owner name of the current PHP script and the computer user name