CHAPTER 1 ?– INTRODUCING PHP 7
General Language Features
Every user has his or her own specific reason for using PHP to implement a missioncritical
application, although one could argue that such motives tend to fall into four
key categories: practicality, power, possibility, and price.
Practicality
From the very start, the PHP language was created with practicality in mind. After all,
Lerdorf??™s original intention was not to design an entirely new language, but to resolve
a problem that had no readily available solution. Furthermore, much of PHP??™s early
evolution was not the result of the explicit intention to improve the language itself,
but rather to increase its utility to the user. The result is a language that allows the
user to build powerful applications even with a minimum of knowledge. For instance,
a useful PHP script can consist of as little as one line; unlike C, there is no need for the
mandatory inclusion of libraries. For example, the following represents a complete
PHP script, the purpose of which is to output the current date, in this case one formatted
like September 23, 2007:
Don??™t worry if this looks foreign to you. In later chapters, the PHP syntax will be
explained in great detail. For the moment just try to get the gist of what??™s going on.
Another example of the language??™s penchant for compactness is its ability to nest
functions.
Pages:
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80