php-src/Zend/tests/get_parent_class_001.phpt

29 lines
381 B
Plaintext
Raw Normal View History

2008-05-13 01:57:21 +08:00
--TEST--
Testing get_parent_class()
--FILE--
<?php
interface ITest {
2020-02-04 05:52:20 +08:00
function foo();
2008-05-13 01:57:21 +08:00
}
abstract class bar implements ITest {
2020-02-04 05:52:20 +08:00
public function foo() {
var_dump(get_parent_class());
}
2008-05-13 01:57:21 +08:00
}
class foo extends bar {
2020-02-04 05:52:20 +08:00
public function __construct() {
var_dump(get_parent_class());
}
2008-05-13 01:57:21 +08:00
}
$a = new foo;
$a->foo();
?>
--EXPECT--
string(3) "bar"
bool(false)