diff options
author | Andi Gutmans <andi@php.net> | 1999-07-28 17:58:38 +0000 |
---|---|---|
committer | Andi Gutmans <andi@php.net> | 1999-07-28 17:58:38 +0000 |
commit | a7af382874a2b4fcb7dabf01b400bd06a162fc74 (patch) | |
tree | fcda57cabffe4fd3f09f9a337961f10f2a303879 /tests | |
parent | 5aa3eff94ff121bbbfefa9cb8dd9dbefc0fffa15 (diff) | |
download | php-git-a7af382874a2b4fcb7dabf01b400bd06a162fc74.tar.gz |
- Added get_class($obj), get_parent_class($obj) and method_exists($obj,"name")
Diffstat (limited to 'tests')
-rw-r--r-- | tests/testobj | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/tests/testobj b/tests/testobj index 7519583cc8..8db3a4136e 100644 --- a/tests/testobj +++ b/tests/testobj @@ -1,14 +1,30 @@ <? +define("endl","\n"); + +if (1) { class foobar { function foobar() { - print "foobar!\n"; $this->initialized = 1; } }; +class barbara extends foobar { + +}; +} + $foo = new foobar; // or die("Unable to construct foobar\n"); -print $foo->initialized; +//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; //$word = new COm("word.application"); //$word->visible = true; //sleep(5); |