mirror of
https://github.com/php/php-src.git
synced 2024-12-18 06:21:41 +08:00
d1e5006c14
And also include explicit linenos in tests.
26 lines
464 B
PHP
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
|