PHP Pocket Reference, 2nd Edition (2009)
Expressions
An expression is the basic building block of the language. Anything with a value can be thought of as an expression. Examples include:
5
5+5
$a
$a==5
sqrt(9)
By combining many of these basic expressions, you can build larger, more complex expressions.
Note that the echo statement we've used in numerous examples cannot be part of a complex expression because it does not have a return value. The print statement, on the other hand, can be used as part of complex expression -- it does have a return value. In all other respects, echo and printare identical: they output data.
All materials on the site are licensed Creative Commons Attribution-Sharealike 3.0 Unported CC BY-SA 3.0 & GNU Free Documentation License (GFDL)
If you are the copyright holder of any material contained on our site and intend to remove it, please contact our site administrator for approval.
© 2016-2026 All site design rights belong to S.Y.A.