Get the App
SLTechnology News&Howtos  ›  Development  › 

How to use the php increment and decrement operator

Shulou Source: shulou.com Published: 2022-06-01 13:10:52 11月14日 Update

This article will explain in detail how to use the php increment and decrement operator. The editor thinks it is very practical, so I share it with you as a reference. I hope you can get something after reading this article.

Php increment and decrement operator + +--

Description:

Add one or minus one by yourself.

+--

Note:

If you give a variable +-- and no longer assign a value, there is little difference between pre-addition and post-addition.

When another variable is assigned a value after addition or subtraction, there is a difference between pre-addition and post-addition.

Summary:

Before: add and subtract the operation before assigning

After: assign the value and then add and subtract the operation

/ / increasing and decreasing / / there is no difference between for.

Tags: Operator operation article variable time more add output good practical content article knowledge plus one reference help related Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Docker Shulou Information MariaDB Linux vpn