Some introductory knowledge of PHP

Source: Internet
Author: User

An "array" is a collection of data. Divided into: indexed arrays and associative arrays. There are three definitions of syntax: Array (), [], array name [].

Class and object: Define class: Class name; Define object: New class name (); a property or function in a class is defined with public. Access the properties or functions of an object, with a symbol.

Cast: Cast: (Type of conversion) value; automatic conversion of arrays: can only be converted to BOOL values automatically

"Arithmetic operators": + 、-、 *,/,%, $i + +: Self-increment, first execute program re-assignment, + + $i: First assign, then execute the program. Array operation: Retains the value of the previous index if the index repeats.

Connection of arrays with Array_merge ($a, $b, $c)

"Comparison operators":>, <, = =, = = =. = = = value is equal; = = = value is equal and type is the same

"Trinocular operator": syntax: conditional expression? When the condition is established, execute this code: when the condition is not established, execute this code;

"Logical operator": or (or) | | ; with (and) &&; non!. Or is it true that all is false, and that it is true that all is true for false.

"Bitwise operation": or |; with &; non-; XOR ^.

Some introductory knowledge of PHP

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.