Is there a function I can use to instantiate an object with arguments?
#include <database.h>
class database
{
function __construct($dbhost, $user, $pass, $etc) { /* etc */ }
function query($sql) { /* dowork*/ }
}
$args = array('localhost', 'user', 'pass', 'etc');
$db = create_object('database', $args); // is there a function like this?
$db->query('SELECT * FROM poop');