PHP 5, PHP 7, PHP 8
date_sunset - Returns time of sunset for a given day and location
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:

Function date_sunset:

Date and Time Functions

Most used PHP functions