1
0
mirror of https://github.com/php/php-src.git synced 2026-03-30 12:13:02 +02:00
Files
archived-php-src/tests/classes/final_redeclare.phpt
Nikita Popov d1e5006c14 Fix lineno for more inheritance errors
And also include explicit linenos in tests.
2019-03-27 13:02:28 +01:00

24 lines
392 B
PHP

--TEST--
ZE2 A final method may not be overwritten
--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 12