2009/10/25 Raymond Irving <xwis...@yahoo.com>:

> I want to automatically initialize a specific sub class when the php page is 
> loaded.
> I'm looking for a solution for php 5.1+ or anything that's optimized for 5.3

You may be able solve this with a simple class_exists() (pseudo-code ahead):

if(class_exists($var)) {
    $class = new $var;
} else {
    $class = new FourOhFour;

PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to