note 41199 added to ref.classobj
| From: | mfirat at fibronline dot com | Date: | Fri, 02 Apr 2004 10:18:05 +0000 |
| Subject: | note 41199 added to ref.classobj | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-67516@lists.php.net to get a copy of this message | ||
<?php
class calculator {
var $c;
function addition($a, $b) {
$this->c = $a + $b;
return $this->c;
}
function subtraction($a, $b) {
$this->c = $a - $b;
return $this->c;
}
function multiplication($a, $b) {
$this->c = $a * $b;
return $this->c;
}
function division($a, $b) {
$this->c = $a / $b;
return $this->c;
}
}
$cc = new calculator;
echo $cc->addition(20, 10)."<br>";
echo $cc->subtraction(20, 10)."<br>";
echo $cc->multiplication(20, 10)."<br>";
echo $cc->division(20, 10)."<br>";
?>
----
Manual Page -- http://www.php.net/manual/en/ref.classobj.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+41199
Delete -- http://master.php.net/manage/user-notes.php?action=delete+41199&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+41199&report=yes
Search -- http://master.php.net/manage/user-notes.php