Home > Backend Development > PHP Tutorial > PHP basic functions

PHP basic functions

不言
Release: 2023-03-23 19:20:02
Original
1444 people have browsed it

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
Copy after login

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;
Copy after login

php functions related to functions

function_exists();
func_get_arg();
func_get_args();
func_num_args();
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template