2002-03-29 10:03:27 +08:00
|
|
|
--TEST--
|
|
|
|
Class method registration
|
|
|
|
--FILE--
|
|
|
|
<?php
|
|
|
|
class A {
|
2020-02-04 05:52:20 +08:00
|
|
|
function foo() {}
|
2002-03-29 10:03:27 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
class B extends A {
|
2020-02-04 05:52:20 +08:00
|
|
|
function foo() {}
|
2002-03-29 10:03:27 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
class C extends B {
|
2020-02-04 05:52:20 +08:00
|
|
|
function foo() {}
|
2002-03-29 10:03:27 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
class D extends A {
|
|
|
|
}
|
|
|
|
|
|
|
|
class F extends D {
|
2020-02-04 05:52:20 +08:00
|
|
|
function foo() {}
|
2002-03-29 10:03:27 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
// Following class definition should fail, but cannot test
|
|
|
|
/*
|
|
|
|
class X {
|
2020-02-04 05:52:20 +08:00
|
|
|
function foo() {}
|
|
|
|
function foo() {}
|
2002-03-29 10:03:27 +08:00
|
|
|
}
|
|
|
|
*/
|
|
|
|
|
|
|
|
echo "OK\n";
|
|
|
|
?>
|
|
|
|
--EXPECT--
|
|
|
|
OK
|