Globalize a variable [PHP]
<p>How would I make a variable GLOBAL without using $_GLOBAL or 'global'</p>

<p>e.g.</p>

<pre><code>$api = new api();

function something() {
  $api-&gt;hello();
}

// Call something()
something(); // Could echo what the called API Function echos.
</code></pre>

<p>Basically calling a class from within a function using an external Variable without calling it in using 'global'..</p>

<p>I heard there was register_globals of some description but has now been removed -.-</p>

<p>Thanks,
Thomas Edwards</p>

<h1>Additional</h1>

<p>A few seem to have not seen my point, The goal is to provide an easy to use noob friendly API. So they dont need to include $api using the 'global' so its as if its all there ready and waiting, Pretty much a framework. I do some stupid stuff with PHP. The project this is for is named PITC and can be found on GitHub <a href="http://github.com/TMFKSOFT/PITC/" rel="nofollow">http://github.com/TMFKSOFT/PITC/</a></p>
