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.

Link to comment
Share on other sites

"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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.