Videos
&& depends of the evaluation of the right expression when left one is true, || doesn't. You could rewrite it to:
if(
$users == 'all' ||
($_POST['user'] == 1 && $users == 'admins') ||
($_POST['user'] == 0 && $users == 'mods')
)
And it'll be the same.
With no parenthesis, PHP will evaluate each expression from left to right, using PHP's operator precedence along the way. However, as in any logical check, throwing AND into the mix can make things confusing and a lot harder to read.
As your link https://www.php.net/manual/en/language.operators.precedence.php already explains, the table is ordered by precedence.
First, you've got in line 3 the type cast (https://www.php.net/manual/en/language.types.type-juggling.php#language.types.typecasting), than the 6th line (arithmetic operators).
Your code is equivalent to
Copy$x = ((float)'100') / 100;
or
Copy$y = (float)'100';
$x = $y / 100;
respectively.
According to the table you linked to, type casting has higher precedence (row 3) than multiplication and division operators (row 6). So it's treated as
Copy$x = ((float)'100') / 100;
It first casts '100' to float, then performs the division.