<?php
class First { public function __construct () { echo "Hello, World!\n"; } public function __destruct () { echo "Goodbye, World!\n"; } }
class Second extends First {
}
$second = new Second;
?>
Outputs
Hello, World! Goodbye, World!
, yet the PHP manual (http://www.php.net/manual/en/language.oop5.decon.php) says:
Note: Parent constructors are not called implicitly. In order to run a parent constructor, a call to parent::__construct() is required.
Is this an error in the manual or in PHP itself? Should I report it somewhere?
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php