PHP basic symbols

Source: Internet
Author: User

Annotation symbol
:

// Single line Annotation

/**/Multi-line Annotation

Use of quotation marks


''Single quotes, no meaning, can be taken without any processing;

"" Double quotes, PHP dynamic processing and output, usually used for variables.

Variable form:

True is true;

The other is false.

Common variables:


String string (numbers, Chinese characters, etc)

INTEGER (1, 2, 3, 4, 5, 0,-1,-2, and so on)

Double Floating Point Number (decimal point)

Array

Object

Common symbols

/"Double quotation marks

// Backslash

/N line feed

/R output

/T hop (Tab)

Operator number

+ Addition operation-subtraction operation

* Multiplication/Division

% Get remainder + + accumulate

-- Accumulate 1. Add strings

Set operation

= Place the value on the right to the left (yes)

+ = Add the right value to the left

-= Reduce the value on the right to the left

* = Multiply the value on the left by the value on the right.

/= Divide the value on the left by the value on the right

. = Add the string on the right to the left

Bitwise Operator

&

| Or

^ Exclusive (XOR)

<Shift left

> Shift to the right

~ 1 Population

Logical operation

<Less> greater

<= Less than or equal to> = greater than or equal

! = Not equal to & and

| Or! No

Other operators

$ Variable symbol

& Variable indicators (before a variable)

@ Do not display the error message (before the function)

-> Object methods or attributes

=> Array element value

? : Ternary Operator

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.