add static key word dynamically before the function
<p>I want to like something :</p>

<pre><code>if(true)
 define("M_STATIC", "static");
else 
 define("M_STATIC", "");


class A
{

M_STATIC function() // this is not allowed.
   {
    //do something my task
   }
}
</code></pre>

<p>I think, you know.... what  i want. :)</p>

<blockquote>
  <p>I'm using a CMS. and new version of
  CMS is changed with some function
  declaration.(like old cms not have
  static but new version have) so i
  think, my page should be compatible
  both version (this class extends by CMS class and this function is override to parent function )</p>
</blockquote>
