summaryrefslogtreecommitdiff
path: root/Zend/tests/get_parent_class_001.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'Zend/tests/get_parent_class_001.phpt')
-rw-r--r--Zend/tests/get_parent_class_001.phpt28
1 files changed, 28 insertions, 0 deletions
diff --git a/Zend/tests/get_parent_class_001.phpt b/Zend/tests/get_parent_class_001.phpt
new file mode 100644
index 0000000..dfef5e0
--- /dev/null
+++ b/Zend/tests/get_parent_class_001.phpt
@@ -0,0 +1,28 @@
+--TEST--
+Testing get_parent_class()
+--FILE--
+<?php
+
+interface ITest {
+ function foo();
+}
+
+abstract class bar implements ITest {
+ public function foo() {
+ var_dump(get_parent_class());
+ }
+}
+
+class foo extends bar {
+ public function __construct() {
+ var_dump(get_parent_class());
+ }
+}
+
+$a = new foo;
+$a->foo();
+
+?>
+--EXPECT--
+string(3) "bar"
+bool(false)