ID: 46502
User updated by: frajper at gmail dot com
Reported By: frajper at gmail dot com
Status: Bogus
Bug Type: Compile Failure
Operating System: RHEL 4
PHP Version: 5.2CVS-2008-11-06 (snap)
New Comment:
Excuse me again,
this is the goog one. (Sorry)
// The following code does not work //
$s = new Dove();
abstract class Bird {}
class Dove extends Bird{}
Previous Comments:
------------------------------------------------------------------------
[2008-11-06 13:20:00] frajper at gmail dot com
Excuse me, but I did a mistake while writing the report. The correct
one is as follows:
// The following code does not work //
$s = new Dove();
abstract class Bird {}
class Father extends Dove {}
------------------------------------------------------------------------
[2008-11-06 12:59:37] [EMAIL PROTECTED]
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php
.
------------------------------------------------------------------------
[2008-11-06 12:49:22] frajper at gmail dot com
Description:
------------
In the same file, you cannot instanciate an object of a child-class
that extends an abstract one before the child-class has been defined.
// The following code does not work //
$s = new Son ();
abstract class Bird {}
class Father extends Dove {}
Reproduce code:
---------------
Fatal error: Class 'Import_ald' not found in
/home/enric00/no_public/import/Import_ald.php on line 7
Expected result:
----------------
Normal execution
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=46502&edit=1