You're given a relatively small amount of memory on the stack to work with, whereas the amount of heap space you're allowed to request scales with the amount of available memory. Thus, big things go on the heap, and small local things go on the stack.
Originally Posted by noobermin
You run the risk of corrupting the stack. Taking a random global that you may or may not know the size of and manipulating it is asking for a buffer overflow. It's not as big of a deal on small projects where one person is doing all of the coding, and would already know the details of the implementation.
How is that a problem? Unless you just are sloppy?
Posting code? Use the [code] or [php] tags.
I don't care, I'm still free. You can't take the sky from me.