You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

27 lines
567 B

--TEST--
You cannot overload a non static method with a static method
--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();
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 %d