Brandon Savage's Blog: Superglobals In Classes: Revisited

Courtesy PHPDeveloper.org  Tue, 07/14/2009 - 06:51

Revisiting an earlier post dealing with superglobals and classes, Brandon Savage looks at an example of why its still a bad idea.

I asserted at the time that superglobals inside of a class violated some basic rules on what a class was supposed to do.

Today, I am revisiting that discussion. The placement of superglobals inside a class creates an impossible situation for code reuse.

[...] Ehat happens when we want to move this [code] to...


 

More related items

Create your own framework... on top of the Symfony2...
Up until now, our application is simplistic as there is only one page. To spice things up a little bit, let's go crazy and add another page that says goodbye: <?php   // framework/bye.php...

How SOPA could actually break the internet .
The proposed Stop Online Piracy Act (SOPA) isn't just a bad idea for freedom of speech -- it's shot through with technical issues as well.

Marco Tabini's Blog: The easiest way to add unit test...
In a new post to his blog Marco Tabini offers some suggestions on unit testing - not really a tutorial on how to it, more of an "easy way in" to introducing it to your development process. ...


 

Post new comment

The content of this field is kept private and will not be shown publicly.
computer-internet.marc8.com