You further will need.
https://code.habibur.com/hijri.zip
And then extract into any folder.
cd astro/ phpize ./configure make sudo make install
Run the above commands and the extension will get built and installed on your system path. Note that code for the extension is in ./astro/ sub directory.
/etc/php.ini and add the following line at the end of it
extension=astro
< ?php
include "astro.inc.php";
print HijriDate(to_jd("2023-02-23 06:23:45",6),6);
The number 6 above is timezone in hours + GMT/UTC. Positive on East side.
There are many other handy functions to find days in month, start date of a hijri month and more. Check the file astro.inc.php for details.
en.hijri.cache and bd.hijri.cache. You need to open astro.inc.php and fix the path of these two files where you store them. These two files are added in the zip file you downloaded above in directory data/
astro/astro.c and astro.inc.php. All of the algorithm are in these two files. The rest of all are boilerplate code.