Constant
Pre-defined constants:
__DIR__: Returns the directory where the current file resides. Returns the directory where the contained file is located if it is in the included file. Note: Unless the current directory is the root directory, the returned string is not followed by A/
__FILE__: Returns the path and file name of the current file. If the included file path and filename are returned in the included file
Variable
Pre-defined variables:
$_server:http://php.net/manual/zh/reserved.variables.server.php
Function
DirName: Returns the parent directory in the given path. If no/is returned in the given path. Represents the current directory, otherwise returns the remaining string after the last/and subsequent string in the given path is removed
STRNCMP ($str 1, $str 2, $len): Compares several characters at the beginning of a two string. If $STR1 is greater than $STR2 returns greater than 0, $str 1 less than $STR2 returns less than 0. Equal return 0
substr_compare:http://php.net/manual/zh/function.substr-compare.php
Strpos: Find where the string first appears
SUBSTR: Returns a substring of a string
RTrim: Delete whitespace characters (or other characters) at the end of a string
Func_get_args: Returns an array containing a list of function arguments
Array_shift: Moves the cell at the beginning of the array to a group
Get_class: Returns the class name of the object
Realpath: Returns normalized absolute pathname, failure returns false (e.g. file does not exist)
Is_dir: To determine whether a given file name is a directory, is to return true, not to return false
Date_default_timezone_set: Sets the default time zone for all datetime functions in a script
Method_exists: Checks whether the method of the class exists. If the class is not known, the auto-load function is called
Strlen: Gets the length of the string. Returns 0 if the string is empty
Explode: Splitting another string with one string
str_replace:http://php.net/manual/zh/function.str-replace.php
Ucwords: Converts the first letter of each word in a string to uppercase
Type
String
Single quote: ' to express ' need to add backslash \ Escape. Express backslash \ Self with two backslashes \ \
Reflection
http://php.net/manual/zh/book.reflection.php
Learn the PHP knowledge points for the source of Yii framework