LoginSignup
0
0

More than 3 years have passed since last update.

PHPの変数の値の更新について(Progate)

Posted at

すごい初歩的な質問です。
現在ProgateでPHP「変数の値を更新する、変数に数字を足す(3)」を学習中です。

$x = 2;
$y = 2;
①echo ++$x;  //echoの前に +1 される 結果:3
②echo $y++;  //echoの後に +1 される 結果:2

上記ですが私の解釈を
それぞれ式にすると
① 1 + $x = 3 ←わかる
② $y + 1 = 2 ←???
になります。。。
この場合②の正解の式はどうなりますか?
レベル低い質問で申し訳ないです。。。

0
0
2

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0