Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- class User {
- public $login;
- public function __construct($login) {
- $this->login = $login;
- }
- public function login() {
- echo "Вася имеет аккаунт ".$this->login." и хочет войти в него.";
- }
- }
- $user = new User("admin");
- $user->login(); // Вася имеет аккаунт admin и хочет войти в него
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement