PHP Syntax

PHP is a mixture of different languages. You can see a strong influence from C (some say Java, but Java also inherited from C). While PHP's syntax is strongly influenced by C, its semantics differ from C's semantics. PHP is interpreted and knows no strict variable types. When you refer to a variable, its type is determined "on the fly" and treated just as the current situation requires. This is a somewhat simplified explanation, but you should keep this in mind when developing.

PHP is an interpreted language, in which code is evaluated and executed step by step. Add to that fact PHP's way of handling variables, and you've introduced a lot of possibilities to programming, but also a lot of traps. This chapter deals with the typical ...

Get Web Application Development with PHP 4.0 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.