Code: Select all
class meh {
function bah(){
echo "whoo?";
}
}
$moo = new meh();
$moo->bah();
Output, As Expected: "whoo?"Code: Select all
class meh {
function bah(){
echo "whoo?";
}
}
$moo = new meh();
function meee(){
global $moo;
$moo->bah();
}
meee();
Output, not quite expected...:
"Fatal error: Call to a member function bah() on a non-object in /var/www/blahblahblah.php on line huh?"I've never seen anything like this on any other box I've used (all winxp), I can just create the object inside the function, but that's a pita... especially for the db class...
...help!