1--TEST-- 2Bug #58756: w.r.t MessageFormatter 3--EXTENSIONS-- 4intl 5--SKIPIF-- 6<?php 7 8if (version_compare(INTL_ICU_VERSION, '51.2') < 0) { 9 die('skip for ICU >= 51.2'); 10} 11if (str_contains(PHP_OS, 'FreeBSD')) { 12 die('xfail Fails on FreeBSD for unknown reason'); 13} 14?> 15--FILE-- 16<?php 17ini_set("intl.error_level", E_WARNING); 18//ini_set("intl.default_locale", "nl"); 19 20$time = 1247013673; 21 22ini_set('date.timezone', 'America/New_York'); 23 24$msgf = new MessageFormatter('en_US', '{0,date,full} {0,time,h:m:s a V}'); 25 26echo "date: " . date('l, F j, Y g:i:s A T', $time) . "\n"; 27echo "msgf: " . $msgf->format(array($time)) . "\n"; 28 29//NOT FIXED: 30/*$msgf = new MessageFormatter('en_US', 31'{1, select, date {{0,date,full}} other {{0,time,h:m:s a V}}}'); 32 33echo "msgf2: ", $msgf->format(array($time, 'date')), " ", 34 $msgf->format(array($time, 'time')), "\n"; 35*/ 36 37?> 38--EXPECT-- 39date: Tuesday, July 7, 2009 8:41:13 PM EDT 40msgf: Tuesday, July 7, 2009 8:41:13 PM usnyc 41