|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2005-07-21 09:36 UTC] stochnagara at hotmail dot com
[2005-07-21 10:16 UTC] derick@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Nov 27 12:00:01 2025 UTC |
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