1. Variable function name, you can use string concatenation 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, PHP REST is required
parse_str(file_get_contents('php ://input'), $put_vars);
4. Parse time from string
echo date('Y-m-d', strtotime('-1 month ago'));
5. DEBUG View Call backtrace
$backtrace = debug_backtrace();var_export($backtrace[0])die();
6. Interactive command line, command line execution PHP
php -a and php -r 'echo "hello ”;'
Please see php -h
7. Memory usage detection
memory_get_peak_usage()memory_get_usage()