PEAR::DB - different syntax for same thing?

From: Date: Thu, 26 Feb 2004 12:11:41 +0000
Subject: PEAR::DB - different syntax for same thing?
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-10957@lists.php.net to get a copy of this message
Hi all I was wondering about the syntax in the factory method of the DB class:
    function &factory($type, $options = false)
    {
        if (!is_array($options)) {
            $options = array('persistent' => $options);
        }
        if (isset($options['debug']) && $options['debug'] >= 2) {
            // expose php errors with sufficient debug level
            include_once "DB/{$type}.php";
        } else {
            @include_once "DB/{$type}.php";
        }
        $classname = "DB_${type}";
... It's the "DB/{$type}.php" vs. "DB_${type}" I'm wondering about... - I know about variable variables but is that just what's going on? Regards, Tommy Ipsen

« previous php.pear.general (#10957) next »