Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- class User{
- //Wlasciwości
- public $na;
- public $name;
- public $email;
- public $numer;
- public $ul;
- public $kod;
- public $miasto;
- public $woje;
- //Konstruktory
- public function __construct($na,$name,$email,$numer,$ul,$kod,$miasto,$woje)
- {$this ->na=$na;
- $this ->name=$name;
- $this ->email=$email;
- $this ->numer=$numer;
- $this ->ul=$ul;
- $this ->kod=$kod;
- $this ->miasto=$miasto;
- $this ->woje=$woje;
- }
- //Metody
- public function pokaz()
- {echo $this->na.'<br/>';
- echo $this->name.'<br/>';
- echo $this->email.'<br/>';
- echo $this->numer.'<br/>';
- echo $this->ul.'<br/>';
- echo $this->kod.'<br/>';
- echo $this->miasto.'<br/>';
- echo $this->woje.'<br/>';
- }
- }
- $jan=new User('Jan','Kowalski','kowalski@wp.pl','627542180','ul. Zlota 30','62-800','Kalisz','Wielkopolskie');
- $jan->pokaz();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement