- Php
- Basics
- Quotes
- Constants
- Control Structures
- Reference
- Number Systems
- Variables
- Definition
- Variable Variable
- Exists
- Type Casting
- Operators
- Aritmetic ♣
- Bitwise
- String
- Comparison
- Logical
- Function
- Definition
- Anonymous
- Reference
- Variable Arguments
- Array
- Basics
- Operations
- Create
- Search
- Modify
- Sort
- Storage
- String
- Basics
- Compare
- Search
- Replace
- Format
- Regexp
- Parse
- Formating
- Json
Increment
If the operator is placed after its operand, the interpreter will first return the value.
/**
* If the operator is placed after its operand,
* the interpreter will first return the value.
*
* Incrementing or decrementing booleans has no effect.
*/
$a = 1;
echo $a++; // 1
echo ++$a; // 3
$b = true;
var_dump(++$b == true); // true
var_dump($b++ == true); // true