Good reasons to migrate PHP libraries to namespaces
Posted
by Joseph Mastey
on Stack Overflow
See other posts from Stack Overflow
or by Joseph Mastey
Published on 2010-04-08T02:02:22Z
Indexed on
2010/04/08
2:13 UTC
Read the original article
Hit count: 357
I have a significant number of object libraries written for PHP 5.2.5, and I'm trying to weigh the benefits of retrofitting them for namespaces. I don't have any concerns about the server PHP version at the moment, since any relevant machines are under my control, so I'm not worried about backwards compatibility. As far as the structure of the libraries, I use the same convention as Zend Framework, (Library_Module_Class_Name
e.g.) so I don't currently have any naming conflicts internal to the libraries. I'd anticipate moving the Library and Module parts of those classnames to namespaces.
That said, if the code is already written, is there any good reason to move over to namespaces?
Thanks, Joe
© Stack Overflow or respective owner