Jump to content

Will global not be available in PHP 6?


vineld

Recommended Posts

That's exactly the point that I'm trying to make, in reverse.  Saying that you should never use globals and PHP would be better off without them would be like saying you should never code static html and Apache would be better off not serving up raw html files and always use an interpreter so people won't make static sites anymore.

 

Sorry, that doesn't make sense. Apache doesn't serve PHP code, but it does serve raw HTML code. Apache doesn't know anything about PHP code except that you told it to pass anything ending with .php to PHP before doing any further stuff with it. You cannot compare apples to bananas.

"Daniel- On the scalability thing, I said a small app, but even if it did grow, going with that oci8 $db connection example, that would scale just fine."

 

 

Were not talking about scaling in the sense I think you mean.

 

 

As code complexity/amount increases so does the confusion that comes along with using globals.

I am completely on your side when it comes to avoiding globals in order to make functions re-usable. However, in my specific case it has to do with functions that are unique for ONE website in order to print specific text messages in a specific way.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.