Identifiers in php

An identifier is simply a name. In PHP, identifiers are used to name variables, functions, constants, and classes. The first character of an identifier must be an ASCII letter (up-percase or lowercase), the underscore character (_), or any of the characters between ASCII 0x7F and ASCII 0xFF. After the initial character, these characters and the … Read more

Whitespace and Line Breaks in php

In general, whitespace doesn’t matter in a PHP program. You can spread a statement across any number of lines, or lump a bunch of statements together on a single line. For example, this statement: raisePrices($inventory, $inflation, $costOfLiving, $greed); could just as well be written with more whitespace: raisePrices ($inventory ,$inflation ,$costOfLiving ,$greed) ; or with … Read more

Statements and Semicolons in php

A statement is a collection of PHP code that does something. It can be as simple as a variable assignment or as complicated as a loop with multiple exit points. Here is a small sample of PHP statements, including function calls, assignment, and an if statement echo “Hello, world”;myFunction(42, “O’Reilly”);$a = 1;$name = “Elphaba”;$b = … Read more

Case Sensitivity in php

The names of user-defined classes and functions, as well as built-in constructs and keywords such as echo, while, class, etc., are case-insensitive. Thus, these three lines are equivalent: echo(“hello, world”);ECHO(“hello, world”);EcHo(“hello, world”); Variables, on the other hand, are case-sensitive. That is, $name, $NAME, and $NaME are three different variables

Definition Lexical Structure

The lexical structure of a programming language is the set of basic rules that governs how you write programs in that language. It is the lowest-level syntax of the language and specifies such things as what variable names look like, what characters are used for comments, and how program statements are separated from each other.

What Does PHP Do ?

PHP can be used in three primary ways: Server-side scripting PHP was originally designed to create dynamic web content, and it is still best suited for that task. To generate HTML, you need the PHP parser and a web server through which to send the coded documents. PHP has also become popular for generating XML … Read more