Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- class Testclass{
- var $Values = array();
- public function ReturnValues(){
- $Arraycount = count($this->Values);
- print("<table style='width:400px;border:1px solid black;'>");
- for($i=0;$i<$Arraycount;$i++){
- print("<tr><td style='width:50%;border-right:1px solid black;'>");
- print(get_class($this->Values[$i]));
- print("</td><td>");
- print($this->Values[$i]);
- print("</td></tr>");
- }
- print("</table>");
- }
- }
- class Username extends Testclass{
- var $Username;
- function __construct($_username){
- $this->Username = $_username;
- }
- public function __toString(){
- if(isset($this->Username)) return (string)$this->Username;
- else return (string)"No Username";
- }
- }
- class Password extends Testclass{
- var $Password;
- function Password($_password){
- $this->Password = md5($_password);
- }
- public function __toString(){
- if(isset($this->Password)) return (string)$this->Password;
- else return (string)"No Password";
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement