mirror of
https://github.com/php/php-src.git
synced 2024-12-18 22:41:20 +08:00
29 lines
355 B
Plaintext
29 lines
355 B
Plaintext
|
--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)
|