mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
22 lines
393 B
PHP
22 lines
393 B
PHP
--TEST--
|
|
ZE2 A class that inherits an abstract method is abstract
|
|
--FILE--
|
|
<?php
|
|
|
|
abstract class pass {
|
|
abstract function show();
|
|
}
|
|
|
|
abstract class fail extends pass {
|
|
}
|
|
|
|
$t = new fail();
|
|
$t = new pass();
|
|
|
|
echo "Done\n"; // Shouldn't be displayed
|
|
?>
|
|
--EXPECTF--
|
|
Fatal error: Uncaught Error: Cannot instantiate abstract class fail in %s:%d
|
|
Stack trace:
|
|
#0 {main}
|
|
thrown in %s on line %d
|