Function __autoload($class) { require ("classes/". $class. ".php"); } $first = new first(); echo "<br>"; $second = new second();