mirror of
https://github.com/php/php-src.git
synced 2024-11-26 19:33:55 +08:00
36 lines
395 B
PHP
36 lines
395 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
|