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 17echo date("D M d Y") . ', sunrise time : ' . date_sunrise(time(), SUNFUNCS_RET_STRING, 38.4, -9, 90, 1) . "\n"; 18echo date("D M d Y") . ', sunset time : ' . date_sunset(time(), SUNFUNCS_RET_STRING, 38.4, -9, 90, 1) . "\n"; 19 20// Check that calling with just the first parameter works. 21var_dump(gettype(date_sunrise(time()))); 22var_dump(gettype(date_sunset(time()))); 23 24?> 25--EXPECTF-- 26Basic test for date_sunrise() and date_sunset() 27 28Deprecated: Function date_sunrise() is deprecated in %s on line %d 29%s %s %d %d, sunrise time : %d:%d 30 31Deprecated: Function date_sunset() is deprecated in %s on line %d 32%s %s %d %d, sunset time : %d:%d 33 34Deprecated: Function date_sunrise() is deprecated in %s on line %d 35string(6) "string" 36 37Deprecated: Function date_sunset() is deprecated in %s on line %d 38string(6) "string" 39