before: \$M2 = $M2 \$M0 = $M0
\n"; $M2 = $M2 + $M0; // echo "after: \$M2 = $M2 \$M0 = $M0
"; // computes r = n - 4*[n/4] and puts the result into $M0: // echo "0: \$M0 = $M0 \$M1 = $M1 \$M2 = $M2
\n"; $M2 = (int)($M2/$M1); // echo "1: \$M0 = $M0 \$M1 = $M1 \$M2 = $M2
\n"; $M2 = $M2 * $M1; // echo "2: \$M0 = $M0 \$M1 = $M1 \$M2 = $M2
\n"; $M0 = $M0 - $M2; // echo "3: \$M0 = $M0 \$M1 = $M1 \$M2 = $M2
\n"; // if $M0 != 0 (i. e., r != 0) jumps to 14 if ($M0 != 0) { // echo "flow 1: \$M0 = $M0 \$M1 = $M1 \$M2 = $M2
\n"; $M1 = 0; // writes 0 in $M1 if r != 0 and stops } else { // echo "flow 2: \$M0 = $M0 \$M1 = $M1 \$M2 = $M2
\n"; $M1 = 0; // writes 1 in $M1 if r == 0 and stops $M1++; } echo "the result: \$M1 = $M1
\n"; $dividend_n = $_GET['n']; $divisor_d = $_GET['d']; if ($divisor_d == 0) echo "Be carefull !! d must not be 0.
\n"; else { if ($M1 == 0) echo "$dividend_n is not a multiple of $divisor_d
"; if ($M1 != 0) echo "$dividend_n is a multiple of $divisor_d
"; } ?>