1. Go to this page and download the library: Download darkfriend/php5-helpers library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
// request body string
$body = \darkfriend\helpers\Request::getBody();
// get request body json
$body = \darkfriend\helpers\Request::getBodyJson();
var_dump($body); // all keys from body json
$age = \darkfriend\helpers\DateTimeHelper::getAge('1992-05-16'); // 28 (by from 3 october 2020)
// or
$age = \darkfriend\helpers\DateTimeHelper::getAge('1992-05-16', '2020-10-03'); // 28 (by from 3 october 2020)