1--TEST-- 2IntlTimeZone::fromDateTimeZone(): argument errors 3--INI-- 4date.timezone=Atlantic/Azores 5--SKIPIF-- 6<?php 7if (!extension_loaded('intl')) 8 die('skip intl extension not enabled'); 9--FILE-- 10<?php 11ini_set("intl.error_level", E_WARNING); 12 13var_dump(IntlTimeZone::fromDateTimeZone()); 14var_dump(IntlTimeZone::fromDateTimeZone(1,2)); 15var_dump(IntlTimeZone::fromDateTimeZone('sdfds')); 16var_dump(IntlTimeZone::fromDateTimeZone(new stdclass)); 17$dt = new DateTime('2012-08-01 00:00:00 WEST'); 18var_dump(IntlTimeZone::fromDateTimeZone($dt->getTimeZone())); 19 20var_dump(intltz_from_date_time_zone()); 21--EXPECTF-- 22Warning: IntlTimeZone::fromDateTimeZone() expects exactly 1 parameter, 0 given in %s on line %d 23 24Warning: IntlTimeZone::fromDateTimeZone(): intltz_from_date_time_zone: bad arguments in %s on line %d 25NULL 26 27Warning: IntlTimeZone::fromDateTimeZone() expects exactly 1 parameter, 2 given in %s on line %d 28 29Warning: IntlTimeZone::fromDateTimeZone(): intltz_from_date_time_zone: bad arguments in %s on line %d 30NULL 31 32Warning: IntlTimeZone::fromDateTimeZone() expects parameter 1 to be DateTimeZone, string given in %s on line %d 33 34Warning: IntlTimeZone::fromDateTimeZone(): intltz_from_date_time_zone: bad arguments in %s on line %d 35NULL 36 37Warning: IntlTimeZone::fromDateTimeZone() expects parameter 1 to be DateTimeZone, object given in %s on line %d 38 39Warning: IntlTimeZone::fromDateTimeZone(): intltz_from_date_time_zone: bad arguments in %s on line %d 40NULL 41 42Warning: IntlTimeZone::fromDateTimeZone(): intltz_from_date_time_zone: time zone id 'WEST' extracted from ext/date DateTimeZone not recognized in %s on line %d 43NULL 44 45Warning: intltz_from_date_time_zone() expects exactly 1 parameter, 0 given in %s on line %d 46 47Warning: intltz_from_date_time_zone(): intltz_from_date_time_zone: bad arguments in %s on line %d 48NULL 49