Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- class name{
- public $name;
- function __construct($n = "No name"){
- $this->name = $n;
- }
- function __destruct(){
- echo "My name is $this->name";
- }
- function test(){
- echo "Hello World";
- }
- }
- $obj = new name("Yousuf");
- // $obj->test();
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement