1. variable function name. you can use a string to concatenate the function name functionaa ($ str) {echo $ str;} 1. variable function name. you can use a string to concatenate the function name.
Function aa ($ str ){
Echo $ str ;}$ function = "aa"; $ function ('Hello'); // ORcall_user_func ($ function, $ param );
2. list all functions and determine whether a function exists.
Get_defined_functions () function_exist ()
3. accept PUT requests, essential for PHP REST
Parse_str (file_get_contents ('php: // input'), $ put_vars );
4. parse time from string
Echo date ('Y-m-D', strtotime ('-1 month ago '));
5. View and call backtrace in DEBUG
$ Backtrace = debug_backtrace (); var_export ($ backtrace [0]) die ();
6. interactive command line, command line execution PHP
Php-a and php-r 'echo "hello ";'
For more information, see php-h.
7. memory usage detection
Memory_get_peak_usage () memory_get_usage ()