<?php class tdUser { public $tdjmeno= "tomas"; public $tdvek = 19; public $tdcislobot = 40; public $tdvaha = 80; public $tdprijmeni= "dvorak"; protected $tdtohleto; protected $tdono; protected $tdtamhle; private $tdheslo; private $tdneco; public function __construct() { } function settdheslo($tdheslo){ $this -> tdheslo = $tdheslo; } function settdtohleto($tdneco){ $this -> tdneco = $tdneco; } function gettdjmeno (){ return $this ->tdjmeno; } function gettdvek (){ return $this ->tdvek; } function gettdcislobot (){ return $this ->tdcislobot; } function gettdvaha (){ return $this ->tdvaha; } function gettdprijmeni (){ return $this ->tdprijmeni; } } ?> <html> <head> <title>nevim</title> </head> <body> <?php $user = new tduser(); $user->settdheslo("12345"); $user->settdtohleto(666); echo $user->gettdjmeno()."<br>"; echo $user->gettdvek()."<br>"; echo $user->gettdcislobot()."<br>"; echo $user->gettdvaha()."<br>"; echo $user->gettdprijmeni()."<br>"; var_dump($user); ?> </body> </html>