#33798 [Opn->Bgs]: Inovoking Parent Constructor Does Work
| From: | derick@php.net | Date: | Thu, 21 Jul 2005 08:16:07 +0000 |
| Subject: | #33798 [Opn->Bgs]: Inovoking Parent Constructor Does Work | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-82252@lists.php.net to get a copy of this message | ||
ID: 33798
Updated by: derick@php.net
Reported By: localhost dot 80 at gmail dot com
-Status: Open
+Status: Bogus
Bug Type: Scripting Engine problem
Operating System: Mac OSX 10.4 Tiger
PHP Version: 5.0.4
New Comment:
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
.
Previous Comments:
------------------------------------------------------------------------
[2005-07-21 09:36:53] stochnagara at hotmail dot com
Use __construct instead of _construct
------------------------------------------------------------------------
[2005-07-21 09:04:07] localhost dot 80 at gmail dot com
Description:
------------
Every Time a create a class and use a _construct()
to pass arguments it does not accept any
Reproduce code:
---------------
<?php
class book{
private $title;
private $isbn;
private $copies;
public function _construct($isbn){
$this->setIsbn($isbn);
$this->getTitle();
$this->getNumberCopies();
}
public function setIsbn($isbn){
$this->isbn = $isbn;
}
public function getTitle(){
$this->title = "Practical Python";
print("Title: " . $this->title . "<br />");
}
public function getNumberCopies(){
$this->copies = "5";
print("Number copies available: " . $this->copies . "<br />");
}
}
$book = new book("1590590066");
?>
Expected result:
----------------
Nothing
Actual result:
--------------
nothing
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=33798&edit=1