Return to abstract_inherit.phpt CVS log | Up to [ELWIX - Embedded LightWeight unIX -] / embedaddon / php / tests / classes |
1.1 ! misho 1: --TEST-- ! 2: ZE2 A class that inherits an abstract method is abstract ! 3: --SKIPIF-- ! 4: <?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?> ! 5: --FILE-- ! 6: <?php ! 7: ! 8: abstract class pass { ! 9: abstract function show(); ! 10: } ! 11: ! 12: abstract class fail extends pass { ! 13: } ! 14: ! 15: $t = new fail(); ! 16: $t = new pass(); ! 17: ! 18: echo "Done\n"; // Shouldn't be displayed ! 19: ?> ! 20: --EXPECTF-- ! 21: ! 22: Fatal error: Cannot instantiate abstract class fail in %s on line %d