Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- class Object implements Serializable {
- private $data;
- function __construct($data) {
- $this->data = $data;
- }
- public function serialize() {
- return serialize($this->data);
- }
- public function unserialize($s) {
- $this->data = unserialize($s);
- }
- public function printObj() {
- return serialize($this);
- }
- }
- ?>
- <?php
- class Login {
- private $text = '';
- public function __construct($text) {
- $this->text = $text;
- }
- public function __toString() {
- return $this->text;
- }
- }
- ?>
- <?php
- class Password {
- private $text = '';
- public function __construct($text) {
- $this->text = $text;
- }
- public function __toString() {
- return $this->text;
- }
- }
- class Flag {
- public static $flag = "FLAG";
- public function getFlags() {
- return array(1);
- }
- }
- class User {
- private $login;
- private $password;
- public function __construct($login, $password) {
- $this->login = $login;
- $this->password = $password;
- }
- public function __toString() {
- return $this->login.':'.$this->password;
- }
- public function __sleep() {
- return $this->login->{$this->password}();
- }
- }
- ?>
- <?php
- ?>
- <?php
- class Textbox {
- private $obj;
- public function __construct($obj) {
- $this->obj = $obj;
- }
- function __toString() {
- return $this->obj->printObj();
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement