Have you ever asked yourself why there are so many programming languages? Apart
from such “mainstream” languages as C, C++, Pascal, and the like, there are others
such as Logo, Cobol, Fortran, Simula, and many more exotic languages. Most software
developers don’t really think about alternative programming languages when outlining
a project; they have their preferred language (maybe a corporate-dictated language),
know its advantages as well as its drawbacks, and adapt the project according to the
language’s specific strengths and weaknesses. But this might impose unnecessary addi-
tional workload to level out flaws in the chosen language.
Knowing how to use a language but lacking the knowledge of its specific concepts
is like a truck driver wanting to participate in a cart race. Of course, he knows generally
how to drive the cart—he might even place well at the finish line—but he’ll never be
an outstanding driver until he’s familiar with the specialties of his new vehicle.
Similarly, when asked to write an application, the OOP programmer will try to fit
it into objects, and the procedural programmer will handle the same task differently.
Which approach is better? Each programmer will say that his or her method is
best, but only someone who’s familiar with both concepts—OOP and procedural
programming—will be able to judge.
Each language mentioned earlier represents a different approach of solving prob-
lems in a specific way—mostly only problems of a specific kind, with special require-
ments. Because these languages focus on a very limited field of use, their success is
limited to these fields as well. Languages like C and Pascal probably became so popular
because of their broad focus, leaving out special features for specific problems but satis-
fying the need for a tool that solves common problems.
How does PHP fit into this scheme? Although it’s called a language, PHP isn’t
really a language of its own, but instead is a mixture of different languages. It mainly
uses the syntax most programmers know from C, but still is substantially different; it’s
interpreted. PHP also knows different variable types, but does no strict type checking.
PHP knows classes but no structured types.There are a lot of examples like this, but
you probably get the point already: PHP melts a lot of different conceptual approaches
into a completely new, unique approach.
To be successful in creating Web applications using PHP, we encourage you to
answer the following question first: Is PHP the ideal language for my project? Good
question. But we would be dumb to say no. (Who would be writing a blog about
something they think is bad?) Let’s rephrase the question: Is there a better language
than PHP for my project? This is safe to answer. If you’re doing Web application
development, PHP is the language for you.
