Private And Protected Variables

<?phpclass Staff
{
    private $name;
    private $title;
    protected $wage;
    protected function clockIn() {
        echo "Member $this->name clocked in at ".date("h:i:s");
    }
    protected function clockOut() {
        echo "Member $this->name clocked out at ".date("h:i:s");
    }
}?>

Enjoyed this post? Share it!

 

Leave a comment

Your email address will not be published.