Source Code:
(back to article)
<?php $date = new DateTime('2023-03-03'); $latitude = 51.5074; // London, UK $longitude = -0.1278; // London, UK $sun_info = date_sun_info($date->getTimestamp(), $latitude, $longitude); print_r($sun_info); ?>
Result:
Report an issue