1--TEST-- 2IntlTimeZone::getErrorCode/Message(): basic test 3--SKIPIF-- 4<?php 5if (!extension_loaded('intl')) 6 die('skip intl extension not enabled'); 7--FILE-- 8<?php 9ini_set("intl.error_level", E_WARNING); 10 11$lsb = IntlTimeZone::createTimeZone('Europe/Lisbon'); 12 13var_dump($lsb->getErrorCode()); 14var_dump($lsb->getErrorMessage()); 15 16var_dump($lsb->getOffset(INF, 1, $a, $b)); 17 18var_dump($lsb->getErrorCode()); 19var_dump($lsb->getErrorMessage()); 20 21?> 22==DONE== 23--EXPECTF-- 24int(0) 25string(12) "U_ZERO_ERROR" 26 27Warning: IntlTimeZone::getOffset(): intltz_get_offset: error obtaining offset in %s on line %d 28bool(false) 29int(1) 30string(67) "intltz_get_offset: error obtaining offset: U_ILLEGAL_ARGUMENT_ERROR" 31==DONE== 31