3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php echo "<pre>"; $sun_info = date_sun_info(strtotime("2006-12-12"), 31.7667, 35.2333); print_r($sun_info); foreach ($sun_info as $key => $val) { echo "$key: " . date("H:i:s", $val) . "\n"; } ?>
Output for 7.2.0
<pre>Array ( [sunrise] => 1165897761 [sunset] => 1165934160 [transit] => 1165915961 [civil_twilight_begin] => 1165896156 [civil_twilight_end] => 1165935765 [nautical_twilight_begin] => 1165894334 [nautical_twilight_end] => 1165937588 [astronomical_twilight_begin] => 1165892551 [astronomical_twilight_end] => 1165939371 ) sunrise: 05:29:21 sunset: 15:36:00 transit: 10:32:41 civil_twilight_begin: 05:02:36 civil_twilight_end: 16:02:45 nautical_twilight_begin: 04:32:14 nautical_twilight_end: 16:33:08 astronomical_twilight_begin: 04:02:31 astronomical_twilight_end: 17:02:51
Output for 5.2.2 - 7.1.10
<pre>Array ( [sunrise] => 1165897780 [sunset] => 1165934167 [transit] => 1165915974 [civil_twilight_begin] => 1165896175 [civil_twilight_end] => 1165935773 [nautical_twilight_begin] => 1165894351 [nautical_twilight_end] => 1165937596 [astronomical_twilight_begin] => 1165892568 [astronomical_twilight_end] => 1165939379 ) sunrise: 05:29:40 sunset: 15:36:07 transit: 10:32:54 civil_twilight_begin: 05:02:55 civil_twilight_end: 16:02:53 nautical_twilight_begin: 04:32:31 nautical_twilight_end: 16:33:16 astronomical_twilight_begin: 04:02:48 astronomical_twilight_end: 17:02:59
Output for 5.1.3 - 5.2.1
<pre>Array ( [sunrise] => 1165899131 [sunset] => 1165934481 [transit] => 1165916806 [civil_twilight_begin] => 1165897448 [civil_twilight_end] => 1165936164 [nautical_twilight_begin] => 1165895545 [nautical_twilight_end] => 1165938066 [astronomical_twilight_begin] => 1165893692 [astronomical_twilight_end] => 1165939920 ) sunrise: 05:52:11 sunset: 15:41:21 transit: 10:46:46 civil_twilight_begin: 05:24:08 civil_twilight_end: 16:09:24 nautical_twilight_begin: 04:52:25 nautical_twilight_end: 16:41:06 astronomical_twilight_begin: 04:21:32 astronomical_twilight_end: 17:12:00
Output for 5.0.0 - 5.1.2
<pre> Fatal error: Call to undefined function date_sun_info() in /in/2nvOT on line 4
Process exited with code 255.
Output for 4.4.5 - 4.4.9
<pre> Fatal error: Call to undefined function: date_sun_info() in /in/2nvOT on line 4
Process exited with code 255.
Output for 4.3.2 - 4.4.4
<pre> Fatal error: Call to undefined function: date_sun_info() in /in/2nvOT on line 4
Process exited with code 255.
Output for 4.3.0 - 4.3.1
<pre> Fatal error: Call to undefined function: date_sun_info() in /in/2nvOT on line 4