Some special syntax for PHP, useful functions, etc.

Source: Internet
Author: User
Tags define array object constant functions integer variables variable

1: Do not appear?> in a single comment
2:boolean type, integer type, float/double type, string type, array type, object Type (object), resource type resource, NULL type
3: The variable between the double quotes "resolves" (Can be \$ with the escape character), the single quotation marks are not parsed, the output is as-is
4: Escape character: \ n line break \ r/T tab \ back slash \$ \ ' \ '
5: Defining the symbol <<<
For example $a = &LT;&LT;&LT;STD
adfsdfsdfsdfsdfsd\$
Std
This effect is the same as double quotes. The included variables are also converted to values.
6: Almost all programming languages = = = = = = = = = = = = = = = = = Remember.
7:is_null ($a) is series functions (Is_bool,is_string,is_int,is_integer,is_float,is_double,is_array,is_object,is_numeric)
The 8:unset variable becomes null and does not return a value.
9: Data type conversion (type) $var Boolean string,integer,float Array object can also be converted to bool Settype ($var, $type) by the Settype function
10:define (' abc ', 123); Define constant defined (' ABC ') Usage: ABC, or constant (' abc ') or $a = ' abc ' constant ($a) all capitalized
One: $a = & $b; reference assignment
12: The function is internally declared with global variables.
13: Static variables for functions with static declarations
14: Variable variable $ $a, $ ($a)
15: Predefined constants: __file__,true,false,null,
16: Predefined variables: $_server
17: Values are passed by reference.
18: function returns multiple values, with an array ...
19: If a function or operation must make a type, you must first determine the type, and then execute the code. The foreach function is slightly, what is judged by the Is_array ...

This article links http://www.cxybl.com/html/wlbc/Php/20130616/38660.html

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.