1--TEST--
2Test error condition of date_sunrise() and date_sunset()
3--FILE--
4<?php
5
6try {
7    date_sunrise(time(), 3);
8} catch (ValueError $exception) {
9    echo $exception->getMessage() . "\n";
10}
11
12try {
13    date_sunset(time(), 4);
14} catch (ValueError $exception) {
15    echo $exception->getMessage() . "\n";
16}
17
18?>
19--EXPECTF--
20Deprecated: Function date_sunrise() is deprecated in %s on line %d
21date_sunrise(): Argument #2 ($returnFormat) must be one of SUNFUNCS_RET_TIMESTAMP, SUNFUNCS_RET_STRING, or SUNFUNCS_RET_DOUBLE
22
23Deprecated: Function date_sunset() is deprecated in %s on line %d
24date_sunset(): Argument #2 ($returnFormat) must be one of SUNFUNCS_RET_TIMESTAMP, SUNFUNCS_RET_STRING, or SUNFUNCS_RET_DOUBLE
25