'; }; $select = function ($id, $value, array $options) { $h = ''; }; $check = function ($id, $on) { return ''; }; /* a time zone select; '' is the default */ $zone = function ($id, $value, $defaultLabel) use ($select) { $o = ['' => $defaultLabel]; foreach (\DateTimeZone::listIdentifiers() as $z) $o[$z] = $z; return $select($id, $value, $o); }; /* voice id => "Name (id)", with the current one kept if it is missing */ $voiceOptions = function (array $voices, $current) { $o = []; foreach ($voices as $id => $v) $o[$id] = $v['name'] . ' (' . $id . ', ' . $v['mode'] . ')'; if ($current !== '' && !isset($o[$current])) $o[$current] = $current . ' ' . _('(missing)'); return $o; };