composer require sunrise/collection
use Sunrise\Collection\Collection; $payload = new Collection($_POST); $payload->get('key', 'default');
https://phpdoc.fenric.ru/
info at phpclasses dot org