php-src/tests/classes/static_mix_2.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

26 lines
464 B
PHP

--TEST--
ZE2 You cannot overload a non static method with a static method
--FILE--
<?php
class pass {
function show() {
echo "Call to function pass::show()\n";
}
}
class fail extends pass {
static function show() {
echo "Call to function fail::show()\n";
}
}
$t = new pass();
$t->show();
fail::show();
echo "Done\n"; // shouldn't be displayed
?>
--EXPECTF--
Fatal error: Cannot make non static method pass::show() static in class fail in %s on line 10