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
22 lines
513 B
PHP
22 lines
513 B
PHP
--TEST--
|
|
IntlTimeZone::getOffset(): errors
|
|
--EXTENSIONS--
|
|
intl
|
|
--SKIPIF--
|
|
<?php
|
|
/* INF being an invalid offset depends on UB in float->int cast behavior. */
|
|
$arch = php_uname('m');
|
|
if ($arch != 'x86_64' && $arch != 'i386')
|
|
die('skip requires x86');
|
|
?>
|
|
--FILE--
|
|
<?php
|
|
|
|
$tz = IntlTimeZone::createTimeZone('Europe/Lisbon');
|
|
var_dump($tz->getOffset(INF, true, $a, $a));
|
|
echo intl_get_error_message(), PHP_EOL;
|
|
|
|
?>
|
|
--EXPECT--
|
|
bool(false)
|
|
IntlTimeZone::getOffset(): error obtaining offset: U_ILLEGAL_ARGUMENT_ERROR
|