]> granicus.if.org Git - php/commitdiff
Do not instanciate an abstract class
authorMarcus Boerger <helly@php.net>
Thu, 28 Nov 2002 17:07:50 +0000 (17:07 +0000)
committerMarcus Boerger <helly@php.net>
Thu, 28 Nov 2002 17:07:50 +0000 (17:07 +0000)
tests/classes/abstract.phpt

index 75e5be7c537b034c93723b8cf8d2ee3eef372034..728f2cceda40309df27c73fbf38265252b262643 100644 (file)
@@ -13,13 +13,14 @@ class pass extends fail {
        function show() {
                echo "Call to function show()\n";
        }
+       function error() {
+               parent::show();
+       }
 }
 
-$t2 = new pass();
-$t2->show();
-
-$t = new fail();
+$t = new pass();
 $t->show();
+$t->error();
 
 echo "Done\n"; // shouldn't be displayed of cause
 ?>