Home  >  Article  >  Backend Development  >  PHP basic functions

PHP basic functions

不言
不言Original
2018-04-14 09:26:051379browse

The content introduced in this article is about the basic functions of PHP. Now I share it with you. Friends in need can refer to it

Variable scope


Local variables

Super global variables

$_SERVER $GLOBALS $_GET $_POST $_REQUEST $_COOKIE $_SESSION

Global variables

Local static variables

Use global variables inside the function

 $a = 4;
    function add(){
        global $a;
        $a++;
        echo $a;
    }
    add();
    echo "<br/>";
    echo $a;

php functions related to functions

function_exists();
func_get_arg();
func_get_args();
func_num_args();

Commonly used functions in the system

Time

Mathematics

String

Print

Array

count()

Related recommendations:

Detailed explanation of PHP basic knowledge

Summary of PHP basic syntax

php basic knowledge note sharing


The above is the detailed content of PHP basic functions. 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
Previous article:PHP merge two 1D arraysNext article:PHP merge two 1D arrays