PROGRAMMING

 
REMEMBERS




Last update:   29-10-2021

Increment ++

If the operator is placed after its operand, the interpreter will first return the value.
 
$a = 1;
echo $a++; // output 1
echo $a; // output 2

$a = 1;
echo ++$a; // output 2
echo $a; // output 2
... 1 lines
 
Incrementing or decrementing booleans has no effect.
 
$a = TRUE;
echo ++$a; // 1
echo $a; // 1
Arithmetics on chars follows Perl's convention.
 
$i = 'W';
for ($n=0; $n<6; $n++) {
    echo ++$i . "n";
}
// output X Y Z AA AB AC 

Questions    
Bitwise

        A B C D E F
🔔
1/4