Home >Backend Development >PHP Problem >What are the interesting functions in php?

What are the interesting functions in php?

藏色散人
藏色散人Original
2021-11-18 09:30:431843browse

Interesting functions in php include: 1. cli_set_process_title function; 2. memory_get_peak_usage function; 3. memory_get_usage function; 4. get_cfg_var function, etc.

What are the interesting functions in php?

The operating environment of this article: windows7 system, PHP7.1 version, DELL G3 computer

What are the interesting functions of php?

Some interesting functions of php:

cli_set_process_title('abcd'); Give the current php process a resounding name;

echo cli_get_process_title(); Get the name of the current php process

What are the interesting functions in php?

Only valid in php-cli

The memory_get_peak_usage() function returns the peak memory usage,

memory_get_usage() can return the amount of memory currently allocated to the PHP script

What are the interesting functions in php?

##get_cfg_var('error_reporting'); Get the value of the PHP configuration option

get_current_user() Get the current PHP script owner name, get the computer user name

What are the interesting functions in php?

<?php
define(&#39;TIONCICO&#39;,&#39;仙士可&#39;);
const TIONCICO2=&#39;仙士可2号&#39;;
function zhuangbi(){
    
}
$tioncico=&#39;仙士可&#39;;
var_dump(get_defined_constants());//返回所有常量的关联数组,键是常量名,值是常量值 define,const定义的都是常量,类里面的const不会返回,static不会返回
var_dump(get_defined_functions());//  获取php所有internal已有函数以及user自己已经定义的函数
var_dump(get_defined_vars());// 获取php所有已定义变量的数组,包括环境变量,服务器变量,用户变量
var_dump(get_loaded_extensions());// — 返回所有编译并加载模块名的 array
var_dump(get_extension_funcs(&#39;mysql&#39;));// — 返回模块函数名称的数组  模块是指php扩展,可获取该扩展所有内置的函数

An array of all constants, including user-defined

What are the interesting functions in php?

All functions

What are the interesting functions in php?

All defined variables, including global variables and user-defined variables

What are the interesting functions in php?

All loaded modules

What are the interesting functions in php?

mysql module function

What are the interesting functions in php?

echo sys_get_temp_dir();//Return to the temporary file directory

What are the interesting functions in php?

echo PHP_VERSION;

var_dump(version_compare(PHP_VERSION,'5.6','gt'));//Is the current version greater than 5.6

echo highlight_file('1.php'); Highlight output php file code

What are the interesting functions in php?

echo php_sapi_name(); // Returns the interface between the web server and PHP Type

What are the interesting functions in php?

Recommended learning: "

PHP Video Tutorial"

The above is the detailed content of What are the interesting functions in php?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn