Is it bad programming practice?
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/5166087/php-global-in-functions">[PHP] global in functions</a>  </p>
</blockquote>



<p>Is it bad programming (PHP) practice to access a global variable in a function inside a class in following way?</p>

<pre><code>class test{

function a(){
global $myvar;
..
}

function b(){
global $myvar;
..
}

}
</code></pre>

<p>Thanks.</p>
