Browse Source

Add test against redeclaring an overloaded method abstract

experimental/threaded
Marcus Boerger 24 years ago
parent
commit
c4272645ce
  1. 22
      tests/classes/abstract_redeclare.phpt

22
tests/classes/abstract_redeclare.phpt

@ -0,0 +1,22 @@
--TEST--
A method cannot be redeclared abstrcat
--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 show()\n";
}
}
class fail extends pass {
abstract function show();
}
echo "Done\n"; // Shouldn't be displayed
?>
--EXPECTF--
Fatal error: Cannot redeclare pass::show() abstract in class fail in %s on line %d
Loading…
Cancel
Save