Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <php
- class Trida
- {
- public $soucet;
- public $a;
- public $b;
- public function __construct()
- {
- $this->a=2;
- $this->b=1;
- }
- public function Soucet()
- {
- $this->soucet = $this->a + $this->b;
- }
- public function Vypis()
- {
- $vypis = $this-> soucet;
- echo "$vypis"
- }
- }
- ?>
Add Comment
Please, Sign In to add comment