Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@neloy-ahmed
Created January 19, 2019 04:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save neloy-ahmed/b1daee90c5b592a7ee5f9165b6f29e46 to your computer and use it in GitHub Desktop.
Save neloy-ahmed/b1daee90c5b592a7ee5f9165b6f29e46 to your computer and use it in GitHub Desktop.
<?php
abstract class World{
//Abstract class can contain variable
public $var1 = 'hello ' . 'world';
//Abstract class can also contain constant
const b = 'i\'m a constant';
abstract protected function draw_map($country_name);
abstract public function draw_flag($country_name);
public function show_info(){
print "This is an abstract class for World";
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment