Doc #78464 [Opn->Csd]: Abstract may not or cannot be instantiated?

From: Date: Sun, 01 Sep 2019 09:25:56 +0000
Subject: Doc #78464 [Opn->Csd]: Abstract may not or cannot be instantiated?
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-16920@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=78464&edit=1 ID: 78464 Updated by: cmb@php.net Reported by: weis at jelly dot cz Summary: Abstract may not or cannot be instantiated? -Status: Open +Status: Closed Type: Documentation Problem Package: Documentation problem Operating System: --- PHP Version: Irrelevant -Assigned To: +Assigned To: cmb Block user comment: N Private report: N New Comment: This bug has been fixed in the documentation's XML sources. Since the online and downloadable versions of the documentation need some time to get updated, we would like to ask you to be a bit patient. Thank you for the report, and for helping us make our documentation better. Previous Comments: ------------------------------------------------------------------------ [2019-09-01 09:25:35] cmb@php.net Automatic comment from SVN on behalf of cmb Revision: http://svn.php.net/viewvc/?view=revision&amp;revision=347912 Log: Fix #78464: Abstract may not or cannot be instantiated? ------------------------------------------------------------------------ [2019-08-27 12:21:09] weis at jelly dot cz Description: ------------ --- From manual page: https://php.net/language.oop5.abstract --- I suggest replace "may not" with "cannot" to make definition more accurate in sentence "Classes defined as abstract may not be instantiated, and any class that contains at least one abstract method must also be abstract.". PHP error message is also unambiguous: Error: Cannot instantiate abstract class MyAbstractClass in C:\path\to\file\index.php on line XYZ Test script: --------------- <?php abstract class MyAbstractClass { public function test() { echo 'test'; } } $a = new MyAbstractClass(); ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=78464&edit=1

« previous php.doc.bugs (#16920) next »