mirror of
https://github.com/php/php-src.git
synced 2024-12-18 06:21:41 +08:00
21 lines
314 B
PHP
21 lines
314 B
PHP
--TEST--
|
|
ZE2 A final class cannot be inherited
|
|
--FILE--
|
|
<?php
|
|
|
|
final class base {
|
|
function show() {
|
|
echo "base\n";
|
|
}
|
|
}
|
|
|
|
$t = new base();
|
|
|
|
class derived extends base {
|
|
}
|
|
|
|
echo "Done\n"; // shouldn't be displayed
|
|
?>
|
|
--EXPECTF--
|
|
Fatal error: Class derived may not inherit from final class (base) in %s on line %d
|