API With a Single URL in PHP

Let's warm up by creating an API with a single address that can be requested. Let this address be the following:

urlhttp://api.loc/index.php

For example, let our API return a random number from 1 to 100 when accessing the address:

api.loc/index.php<?php
  echo mt_rand(1, 100);
?>
Задание 1

Create an API that will return the current time in the hours-minutes-seconds format.