mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00

This is effectively removing ZPP tests, enabling warnings, and moving INI settings into the INI PHPT block
34 lines
577 B
PHP
34 lines
577 B
PHP
--TEST--
|
|
IntlCalendar::createInstance() basic test
|
|
--EXTENSIONS--
|
|
intl
|
|
--INI--
|
|
intl.default_locale=nl
|
|
date.timezone=Europe/Amsterdam
|
|
--FILE--
|
|
<?php
|
|
|
|
$cal = IntlCalendar::createInstance();
|
|
print_R($cal->getTimeZone());
|
|
print_R($cal->getLocale(Locale::ACTUAL_LOCALE));
|
|
echo "\n";
|
|
print_R($cal->getType());
|
|
echo "\n";
|
|
|
|
$timeMillis = $cal->getTime();
|
|
$time = time();
|
|
|
|
var_dump(abs($timeMillis - $time * 1000) < 2000);
|
|
|
|
?>
|
|
--EXPECTF--
|
|
IntlTimeZone Object
|
|
(
|
|
[valid] => 1
|
|
[id] => Europe/Amsterdam
|
|
[rawOffset] => 3600000
|
|
[currentOffset] => %d
|
|
)
|
|
nl
|
|
gregorian
|
|
bool(true)
|