1--TEST-- 2MessageFormat accepts IntlCalendar args 3--EXTENSIONS-- 4intl 5--SKIPIF-- 6<?php 7if (str_contains(PHP_OS, 'FreeBSD')) { 8 die('xfail Fails on FreeBSD for unknown reason'); 9} 10?> 11--FILE-- 12<?php 13ini_set("intl.error_level", E_WARNING); 14//ini_set("intl.default_locale", "nl"); 15ini_set('date.timezone', 'Europe/Lisbon'); 16 17$cal = new IntlGregorianCalendar(2012,04,17,17,35,36); 18 19$msgf = new MessageFormatter('pt_PT', '{0,date,full} {0,time,h:m:s a V}'); 20echo $msgf->format(array($cal)), "\n"; 21 22//NOT FIXED: 23/*$msgf = new MessageFormatter('en_US', 24'{1, select, date {{0,date,full}} other {{0,time,h:m:s a V}}}'); 25 26echo "msgf2: ", $msgf->format(array($time, 'date')), " ", 27 $msgf->format(array($time, 'time')), "\n"; 28*/ 29 30?> 31--EXPECTF-- 32Deprecated: Calling IntlGregorianCalendar::__construct() with more than 2 arguments is deprecated, use either IntlGregorianCalendar::createFromDate() or IntlGregorianCalendar::createFromDateTime() instead in %s on line %d 33quinta-feira, 17 de maio de 2012 5:35:36 da tarde ptlis 34