我在php中得到了一些奇怪的答案。 有人可以解释原因吗?

我在php中得到了一些奇怪的答案。 有人可以解释原因吗?

问题描述:

Hi there i am learning php and i was just playing around with simple code but in my last code the computer is showing weird answer

And my browser shows result as "91919331.666666666667" I understand that 91 is result of the first echo and second 91 is result of 2nd echo and 93 is of 3rd and 31 is of 4th But after that why is the browser showing .666666666667

And also when i commented every echo but 2nd the result of that echo changed from 91 to 90

<?php
$number1 = 90;
$number2 = 3;
//echo ++$number1 ;
echo $number1++;
//echo $number1 + $number2 / $number2;
//echo ($number1 + $number2)/ $number2;
?>

<?php
$number1 = 90;
$number2 = 3;
//increment number, display (91)
echo ++$number1 ;

//display number then increment (shows 91, number1 goes to 92)
echo $number1++;

//this will be 92 + (3 / 3) so 92+1 echos 93
echo $number1 + $number2 / $number2;

//this will be (92+3) / 3 so 31.6666666
echo ($number1 + $number2)/ $number2;
?>