📜  php 将变量减 1 - PHP 代码示例

📅  最后修改于: 2022-03-11 14:54:10.345000             🧑  作者: Mango

代码示例3
$var = 1;
// use value (1) THEN decrement by one
$var--;
// decrement by one THEN use value (0)
--$var;

// aside: decrement by custom amount (1 emulates the above)
$var -= 1;
$var -= $step;