<?php

mb_internal_encoding("UTF-8");

class Worker
{
    public function __construct($salary, $coffee, $reports)
    {
        $this->salary  = $salary;
        $this->coffee  = $coffee;
        $this->reports = $reports;
    }
}
$me = array(
    500,
    20,
    200
);
$ma = array(
    400,
    15,
    150
);
$en = array(
    200,
    5,
    50
);
$an = array(
    800,
    50,
    5
);
function doShit($array)
{
    $workers = array();
    foreach ($array as $k => $v) {
        if ($k == 0) {
            $k1 = $v;
        } elseif ($k == 1) {
            $k2 = $v;
        } elseif ($k == 2) {
            $k3 = $v;
        }
        
    }
    $worker    = new Worker($k1, $k2, $k3);
    $workers[] = $worker;
    return $workers;
}
doShit($me);
var_dump($workers);