title: Is there a PHP equivalent for `public static main(String[] args)` in Java?
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/8800397/is-there-a-way-to-program-100-object-oriented-in-php">Is there a way to program 100% object-oriented in PHP?</a>  </p>
  </blockquote>
  
  
  
  <p>What I am trying to accomplish would look something like this:</p>
  
  <pre><code> &lt;?php
        //index.php
        class Site{
             public static function main(){
                  // starts all the processing of the site
             }
        }
   ?&gt;
  </code></pre>
  
  <p>So that when someone visits the site's <code>index.php</code> the site will start up without having any code outside the class.</p>
  
  <p>Yes I know that I could use <code>__autoload</code> or even <code>spl_autoload_register</code> to handle autoloading of classes but that would still most likely need to be added outside of the class. </p>
  
  <p>I have my doubts that this is possible but I don't know why this wouldn't be possible.</p>