Study Notes PHP (3)

WBOY
Release: 2016-08-08 09:30:40
Original
747 people have browsed it

1. In php, functions are not case-sensitive, but variables are case-sensitive

2. Functions can define optional parameters, but if there are multiple optional parameters, the default values ​​​​are consecutive from right to left , the middle cannot be skipped; when using this function, the parameters are from left to right

3. Put the frequently used functions in a file, and then import them with required().

4. The method to determine the data type is as follows:

isset(): //Whether the variable has been declared

empty(): //Whether the variable is empty

defined()://whether the constant has been defined define()

array_key_exists(mixed key, array search): //Check whether the given key name or index exists in the array

is_numeric ( mixed var ): // Detect whether the variable is a number or a numeric string

is_bool(): // Detect whether the variable is a Boolean

is_float(): // Detecting whether the variable is a floating point type has the same usage as is_double and is_real()

is_int(): // Detecting whether the variable is an integer is_integer() has the same usage

is_string(): // Check whether the variable is a string

is_object(): // Check whether the variable is an object

is_array(): // Check whether the variable is an array

is_null (): // Check whether the variable is NULL and whether the value is NULL. It is case sensitive

The above introduces the study notes PHP (3), including the content. I hope it will be helpful to friends who are interested in PHP tutorials.

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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!