A Twist In Namespaces: A New Revolution in PHP
Aug 28, 2009, 20:03 (0 Talkback[s])
(Other stories by Marc Steven Plotz)
How to Help Your Business Become an AI Early Adopter
"What this actually requires is finding common functionality and
implementing them in a reusable framework--usually as classes.
However, even the widest scope implementation will eventually start
running into issues with naming conventions. This is where
namespaces really shines.
"PHP has been a while in the making though. Probably what
seperates PHP from other languages like C# and Java is that PHP has
evolved. We all know that the original version of PHP (then called
Personal Home Pages) was released in 1995 by Rasmus Lerdorf. By the
time PHP reached version 3 it was already an extremely powerful
procedural Programming language. PHP4 introduced rudementory OOP
implementations, PHP5 represents a rather stable and concise OOP
model. Now PHP 5.3 implements Namespaces.
"Critics of PHP will argue that the language is a mess: function
names are inconsistent (strpos(), str_split(), substr()), object
handling has been tacked on, and some of the syntax is very bizarre
when compared to the conventions of other languages. However, PHP
is one of the most-used programming languages there are. The
reason: versatility. Virtually anyone, without much training, can
start to use PHP in a simple procedural form, and PHP written 10
years ago in PHP3 will most likely work on PHP5.3 without a major
rewrite. PHP development is rapid if not elegant or structured: it
is rarely pretty or structured, yet it is readable in a way that
very few other languages are."