php-src/tests/testobj

32 lines
615 B
Plaintext
Raw Normal View History

1999-04-08 05:05:13 +08:00
<?
define("endl","\n");
1999-08-02 01:56:09 +08:00
//if (1) {
class foobar {
function foobar() {
$this->initialized = 1;
}
};
1999-04-08 05:05:13 +08:00
class barbara extends foobar {
};
1999-08-02 01:56:09 +08:00
//}
1999-07-29 12:03:03 +08:00
$name = "foobar";
$foo = new $name; // or die("Unable to construct foobar\n");
//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();