PHP is an expression-oriented language, in the sense that almost everything is an expression. An expression in PHP is anything that can be used as a value. Including integer constants, variables, and function calls. It is any combination of values, variables, operands, and functions that sets a value. If it can be used as if it were a value, it is an expression in PHP. When we take a variable and use an operator on it or a pair of variables we have created an expression in PHP. PHP expressions are best defined as “anything that has a value”.
When we create simple variables we are using expressions:
<?php $var1 = 10; // 10 is an expression with an integer type value of 10 $var2 = $var1; // $var1 is an expression with an integer type value of 10 ?>