1
0
mirror of https://github.com/php/php-src.git synced 2026-04-16 12:31:06 +02:00
Files
archived-php-src/ext/date/tests/date_default_timezone_get_error.phpt
2017-09-12 11:25:21 +08:00

30 lines
863 B
PHP

--TEST--
Test date_default_timezone_get() function : error conditions
--FILE--
<?php
/* Prototype : string date_default_timezone_get ( void )
* Description: Gets the default timezone used by all date/time functions in a script.
* Source code: ext/standard/data/php_date.c
*/
date_default_timezone_set("UTC");
echo "*** Testing date_default_timezone_get() : error conditions ***\n";
echo "\n-- Testing date_create() function with more than expected no. of arguments --\n";
$extra_arg = 99;
var_dump( date_default_timezone_get($extra_arg));
?>
===Done===
--EXPECTF--
*** Testing date_default_timezone_get() : error conditions ***
-- Testing date_create() function with more than expected no. of arguments --
Warning: date_default_timezone_get() expects exactly 0 parameters, 1 given in %sdate_default_timezone_get_error.php on line %d
NULL
===Done===