<?php
  class Employee {
    private $name;
    private $department;

    function __construct($name, $department) {
      $this->name = $name;
      $this->department = $department;
    }
    function showBadge() {
      echo "Name: ".$this->name."<br>";
      echo "Department: ".$this->department."<br>";
    }
    function getDepartment() {
      return $this->department;
    }
    function setDepartment($new) {
      if (is_string($new)) {
        $this->department = $new;
        return true;
      } else {
        return false;
      }
    }
  }
  $employee1 = new Employee("Robert", "Distribution");
  if ($employee1->setDepartment("Office")) {
    echo $employee1->getDepartment();
  } else {
    echo "Error: Wrong value";
  }
?>