print get_class($cc); print "</br>"; $cc2 = new ChildClass(); print $cc2->getClass(); print "</br>"; /*---------- Exception Handling ----------*/ /*$db = new DB(); if(!$db->connect()) print("Failed to connect to PostgreSQL Server"); print("</br>");*/ $dbexc = new DB(); try { $dbexc->connect(); } catch (Exception $e) { print "<pre>"; var_dump($e); print "</pre>"; } print "</br>"; $db2 = new DAL(); try { $db2->connect("dbname=golpo user=postgrses2"); try { $db2->execute("select * from abc"); } catch (Exception $queryexception) { print $queryexception->getMessage(); } } catch (Exception $connectionexception) { print $connectionexception->getMessage(); } /*---------- Collecting all php errors as Exception ----------*/ //$handling = new ErrorHandling();