Operators


Operator Precedence

Precedence Operator Mark Operators
High
|
|
|
|
|
|
|
|
Low
[ ( Parenthesis
++ -- ~ (int) (string) (bool) Types / Increment / Decrement
! Logical
* / % Arithmetic
+ - . Arithmetic
<< >> Bitwise
< <= > >= Comparison
== != === !== <> Comparison
& Bitwise
^ Bitwise
| Bitwise
&& Logical
|| Logical
? : Ternary
= += -= *= /= .= %= &= |= ^= <<= >>= Assignment

Arighmetic Operators

The result of arithmetic operations between integers is always integer at PHPoC.

<?php
$a = 3;
$b = 2;
echo $a / $b;   // Output: 1(Integer)
?>
<?php
$a = 3;
$b = 2;
echo $a / $b;   // Output: 1.5
?>

Error Control Operators

Not support for error control operators(@).

Excecution Operators

Not support for execution operators(` `).

Logical Operators

Logical operators only accept mark ('!', '&&', '||' and '^') but not accepts letter (NOT, AND, OR, and XOR).

Array Operators

Not support for array operators (Union, Equality, Identity and etc.).