Guest User

Untitled

a guest
Jul 19th, 2018
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.29 KB | None | 0 0
  1. <php
  2. class Trida
  3. {
  4. public $soucet;
  5. public $a;
  6. public $b;
  7.  
  8. public function __construct()
  9. {
  10.    $this->a=2;
  11.    $this->b=1;
  12. }
  13.  
  14. public function Soucet()
  15. {
  16.    $this->soucet = $this->a + $this->b;
  17. }
  18.  
  19. public function Vypis()
  20. {
  21.    $vypis = $this-> soucet;
  22.    echo "$vypis"
  23. }
  24. }
  25. ?>
Add Comment
Please, Sign In to add comment