1999-04-08 05:05:13 +08:00
|
|
|
<?
|
1999-07-29 01:58:38 +08:00
|
|
|
define("endl","\n");
|
|
|
|
|
1999-05-28 19:09:39 +08:00
|
|
|
class foobar {
|
|
|
|
function foobar() {
|
|
|
|
$this->initialized = 1;
|
|
|
|
}
|
|
|
|
};
|
1999-04-08 05:05:13 +08:00
|
|
|
|
1999-07-29 01:58:38 +08:00
|
|
|
class barbara extends foobar {
|
|
|
|
|
|
|
|
};
|
|
|
|
|
1999-07-29 12:03:03 +08:00
|
|
|
$name = "foobar";
|
|
|
|
$foo = new $name; // or die("Unable to construct foobar\n");
|
1999-07-29 01:58:38 +08:00
|
|
|
//print $foo->initialized;
|
|
|
|
|
|
|
|
$boo = new barbara;
|
|
|
|
print get_class($foo).endl;
|
|
|
|
print get_parent_class($foo).endl;
|
|
|
|
print get_class($boo).endl;
|
|
|
|
print get_parent_class($boo).endl;
|
|
|
|
print method_exists($foo,"foobar").endl;
|
|
|
|
print method_exists($boo,"foobar").endl;
|
|
|
|
print method_exists($boo,"barbara").endl;
|
1999-05-30 02:28:46 +08:00
|
|
|
//$word = new COm("word.application");
|
|
|
|
//$word->visible = true;
|
|
|
|
//sleep(5);
|
|
|
|
//$word->quit();
|