mirror of
https://github.com/php/php-src.git
synced 2024-12-01 22:03:36 +08:00
37 lines
378 B
PHP
37 lines
378 B
PHP
--TEST--
|
|
Class method registration
|
|
--FILE--
|
|
<?php
|
|
class A {
|
|
function foo() {}
|
|
}
|
|
|
|
class B extends A {
|
|
function foo() {}
|
|
}
|
|
|
|
class C extends B {
|
|
function foo() {}
|
|
}
|
|
|
|
class D extends A {
|
|
}
|
|
|
|
class F extends D {
|
|
function foo() {}
|
|
}
|
|
|
|
// Following class definition should fail, but cannot test
|
|
/*
|
|
class X {
|
|
function foo() {}
|
|
function foo() {}
|
|
}
|
|
*/
|
|
|
|
echo "OK\n";
|
|
?>
|
|
--EXPECT--
|
|
OK
|
|
|