Skip to content

Instantly share code, notes, and snippets.

@nahidulhasan
Last active May 23, 2018 04:35
Show Gist options
  • Save nahidulhasan/3721447faf4c0ed40777f13b21658514 to your computer and use it in GitHub Desktop.
Save nahidulhasan/3721447faf4c0ed40777f13b21658514 to your computer and use it in GitHub Desktop.
<?php
interface workerInterface
{
public function work();
public function sleep();
}
class HumanWorker implements workerInterface
{
public function work()
{
var_dump('works');
}
public function sleep()
{
var_dump('sleep');
}
}
class RobotWorker implements workerInterface
{
public function work()
{
var_dump('works');
}
public function sleep()
{
// No need
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment