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