1--TEST-- 2Basic test for date_sunrise and date_sunset based on example in PHP manual 3--FILE-- 4<?php 5 6date_default_timezone_set('UTC'); 7 8/* calculate the sunrise time for Lisbon, Portugal 9Latitude: 38.4 North 10Longitude: 9 West 11Zenith ~= 90 12offset: +1 GMT 13*/ 14 15echo "Basic test for date_sunrise() and date_sunset()\n"; 16 17// suppress date() function strict msgs 18error_reporting(E_ALL & ~E_STRICT); 19 20echo date("D M d Y") . ', sunrise time : ' . date_sunrise(time(), SUNFUNCS_RET_STRING, 38.4, -9, 90, 1) . "\n"; 21echo date("D M d Y") . ', sunset time : ' . date_sunset(time(), SUNFUNCS_RET_STRING, 38.4, -9, 90, 1) . "\n"; 22 23?> 24===Done=== 25--EXPECTF-- 26Basic test for date_sunrise() and date_sunset() 27%s %s %d %d, sunrise time : %d:%d 28%s %s %d %d, sunset time : %d:%d 29===Done=== 30