PHP - Assignment: =
The assignment operator is used to assign a value to a variable. it can be used for any data type with the only condition that the first parameter (left side) must be a value receiver, for example a variable. depending on the programming language can be different terms for the assignment of values to the variables, for example depending on the type.=
Description
var =expression;
Input
- var - value receiver
- expression - Expressions
Output
- Result - Any
Examples
PHP
Assignment the possible of use:$x = 1.234; // x = 1.234
$y = $x * 3.14; // y = 3.87476
if ($y<5)
$y = $y/ 3.14; // y = 1.234
PHP
Other pieces of example codes:$a = 5 < 10;
$z = ($x-$y)-30.5;
$y = (double)$x / 0xa;
$z = ~($x & 5) & $y;
$x = 10 * 5;
$a1 = false && false;
Assignment in another programming language:
Differences to: