mirror of
https://github.com/php/php-src.git
synced 2024-09-21 18:07:23 +00:00
d1e5006c14
And also include explicit linenos in tests.
25 lines
449 B
PHP
25 lines
449 B
PHP
--TEST--
|
|
ZE2 You cannot overload a static method with a non static method
|
|
--FILE--
|
|
<?php
|
|
|
|
class pass {
|
|
static function show() {
|
|
echo "Call to function pass::show()\n";
|
|
}
|
|
}
|
|
|
|
class fail extends pass {
|
|
function show() {
|
|
echo "Call to function fail::show()\n";
|
|
}
|
|
}
|
|
|
|
pass::show();
|
|
fail::show();
|
|
|
|
echo "Done\n"; // shouldn't be displayed
|
|
?>
|
|
--EXPECTF--
|
|
Fatal error: Cannot make static method pass::show() non static in class fail in %s on line 10
|