0408 Learning-Self-increment rhts 040 Tomn 040 Mide 04

Source: Internet
Author: User
Increment operator and decrement operator
$a = 10;
$a + +;
echo $a;

The above $a is the output item so it is assigned first and then the operation

$a value is 11

-----------------------------------------------------------
echo "";
$e = 10;
-$e;
Echo $e;

The above $e is the output item so the operation is then assigned

$e value is 9

-----------------------------------------------------------
echo "";
$b = 10;
$x = $b + + + + $b;
echo $b. " ";
echo $x;
Above ($b + 1) plus (+1 of $b)
+ + $b First operation and then use

At this point the value of the first $b is 10;

The corresponding second value is 12

-----------------------------------------------------------
echo "";
$c = 10;
$z = $c + + + $c + +;
echo $c. " ";
Echo $z;

The above $c + + first use the re-operation

At this point the value of the first $c is 10;

The second value is 12

-----------------------------------------------------------

The above describes the 0408 learning-self-reduction, including 040,408 aspects of the content, I hope to be interested in PHP tutorial friends helpful.

  • 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.