note 41199 deleted from ref.classobj by felipe
| From: | felipe@php.net | Date: | Mon, 10 Dec 2007 21:58:25 +0000 |
| Subject: | note 41199 deleted from ref.classobj by felipe | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-133321@lists.php.net to get a copy of this message | ||
Note Submitter: mfirat at fibronline dot com
----
<?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>";
?>