The PHP learning PHP operator to learn video in Photoshop

Source: Internet
Author: User
Tags bitwise operators php operator
PHP operators
I'll take a look at the arithmetic, string, logic, and comparison operators of PHP3, respectively.
1. Arithmetic operators
+: $a + $b plus $a plus $b-: $a-$b minus $a minus $b *: $a * $b multiply by $a multiplied by $b/: $a/$b divide $a by $b%: $a% $b modulo $a divided by $b remainder if two Count are integer values (strings will be converted to integer values), and division sign ("/") returns an integer value (divisible by value). If either operand is a floating-point value, do a floating-point division.
2 string operators
String operators have only string connectors (".").   $a = "Hello"; $b = $a. "World!"; Now $b = "Hello world!"
3. Assignment operators
The basic assignment operator is "=". The value of an assignment expression is the value assigned to it. For example, the value of the expression $a = 3 is 3. This allows you to do something complicated: $a = ($b = 4) + 5;   Now $a equals 9, $b is 4. In addition to the basic assignment, there are "compound operators". For all binary numbers and strings, you are allowed to do variable self-compounding operations.
For example: =: $a = 3; + =: $a + = 5;      Set $ A to 8, i.e. $a = $a + 5;   $b = "Hello"; . : $b. = "there!"; Set $b as "Hello there!", just like $b = $b. "There!";
4, bitwise operators
Bit operations allow you to set or reset the specified data. &amp: With operations, $a & $b with $a and $b are set to the result is set |: or arithmetic, $a | $b or $a or $b has a set that results in a bit ~: Non-arithmetic, ~ $a non-$a not set the result is set
5. Logical operators
And: $a and $b with $a and $b are true if the result is true or: $a or $b or $a or $b have a true XOR: The result is true if the $a XOR $b different or $a and $b are true! :  ! $a non-$a is false, the result is true &&: $a && $b true with $a and $b as true results | |: $a | |   When a $b or $a or $b has a true result for a true comparison of two variables, there are two operators for the "and" and "or" operations, which means that two operators have different precedence 6, comparison operator comparison operators, which, like names, allow you to compare two values. = =: $a = = $b equals $a equals $b result is true! =: $a! = $b Not equal to $a not equal to $b result is true <: $a < $b less than $a less than the result is true >: $a > $b greater than $a greater than $b result True <=: $a <= $b less than or equal to $a less than or equals to $b result is true >=: $a >= $b greater than or equal to $a greater than or equal to $b result is true

The above describes the Photoshop learning video php PHP operators, including the Photoshop Learning video content, I hope the PHP tutorial interested in a friend helpful.

  • Related Article

    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.