Basic symbols and usage in PHP

Source: Internet
Author: User
After using it for so long, the basic symbols of PHP were not fully recognized. I found the @ number and found it for a long time. post the basic symbol list. For more information, see ~

After using it for so long, the basic symbols of PHP were not fully recognized. I found the @ number and found it for a long time. post the basic symbol list. For more information, see ~

Annotation symbol:

Use of quotation marks

Variable form:

Common variables:

Available methods include gettype ($ mix) and settype ($ mix, $ typename );

Common symbols

Operator number

Set operation

Bitwise Operator

Logical operation

Other operators

Basic Method

1. PHP converts strings to uppercase and lowercase!

2. PHP encrypted string (case sensitive)

3. quotation marks

I. Single quotes are output as is

2. Double quotation marks are output based on content Interpretation

3. A single quotation mark is used to execute a command, such as 'pwd '.

4. "\" acts on translated characters. For example, "\ n" is a line break!

4. function: htmlspecialchars ()

This function converts special characters into HTML strings (&....;). The most common use case may be the message board for handling customer messages.

This function only converts the preceding special characters and does not convert all of them into the ASCII conversion defined in HTML.

5. Batch output HTML content!

(Note: "{Variable}" is used for internal variables }")

6. Determine whether the file exists and the output content

7. unset the variable;

8. is_int;

Checks whether the variable is an integer;

9. is_null;

Checks whether the variable is NULL;

10. is_string

Checks whether the variable is a string.

11. is_real;

Is_float () alias

12. isset

Check whether the variable is set

13. is_bool

Check whether the variable is Boolean

14. is_array

Checks whether the variable is an array.

15. is_object

Checks whether a variable is an object.

16. SubStr.

17. Nb2br

Convert the escape line into 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.