2002-11-24 23:50:28 +08:00
|
|
|
--TEST--
|
2003-08-09 22:48:47 +08:00
|
|
|
ZE2 You cannot overload a non static method with a static method
|
2002-11-24 23:50:28 +08:00
|
|
|
--SKIPIF--
|
|
|
|
<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?>
|
|
|
|
--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();
|
|
|
|
|
2002-12-10 19:21:30 +08:00
|
|
|
echo "Done\n"; // shouldn't be displayed
|
2002-11-24 23:50:28 +08:00
|
|
|
?>
|
|
|
|
--EXPECTF--
|
|
|
|
Fatal error: Cannot make non static method pass::show() static in class fail in %s on line %d
|