date_sunset

PHP 5, PHP 7, PHP 8
date_sunset - Returns time of sunset for a given day and location
Manual
Code Examples

Example #1 date_sunset example

Result: Mon Dec 20 2004, sunset time : 18:13
PHP Version:

Example #2 No sunset

Result: bool(false)
PHP Version: