Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- class Wan
- {
- var $price;
- var $desc;
- function setPrice($a)
- {
- $this->price = $a;
- }
- function getPrice()
- {
- echo $this->price;
- }
- function setDesc($a)
- {
- $this->desc = $a;
- }
- function getDesc()
- {
- echo $this->desc;
- }
- }
- $obj = new Wan;
- $obj->setPrice(12);
- $obj->getPrice();
- $obj->setDesc("Wan");
- $obj->getDesc();
- ?>
Advertisement
Add Comment
Please, Sign In to add comment