fork download
  1. static function createEmployee($amount, $class, $rank, $leader)
  2. {
  3. $employees = array();
  4. for($i=1; $i<=$amount; $i++ ) {
  5. $employees[] = new $class($rank, $leader);
  6. }
  7. return $employees;
  8. }
Success #stdin #stdout 0.02s 24448KB
stdin
Standard input is empty
stdout
    static function createEmployee($amount, $class, $rank, $leader) 
    {
        $employees = array();
        for($i=1; $i<=$amount; $i++ ) {
            $employees[] = new $class($rank, $leader);
        }
        return $employees;
    }