2003-03-03 19:10:30 +08:00
|
|
|
--TEST--
|
2003-08-09 22:48:47 +08:00
|
|
|
ZE2 A final method may not be overwritten
|
2003-03-03 19:10:30 +08:00
|
|
|
--SKIPIF--
|
|
|
|
<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?>
|
|
|
|
--FILE--
|
|
|
|
<?php
|
|
|
|
|
|
|
|
class pass {
|
|
|
|
final function show() {
|
|
|
|
echo "Call to function pass::show()\n";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
$t = new pass();
|
|
|
|
|
|
|
|
class fail extends pass {
|
|
|
|
function show() {
|
|
|
|
echo "Call to function fail::show()\n";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
echo "Done\n"; // Shouldn't be displayed
|
|
|
|
?>
|
|
|
|
--EXPECTF--
|
|
|
|
Fatal error: Cannot override final method pass::show() in %s on line %d
|