1--TEST-- 2IntlDatePatternGenerator::getBestPattern() 3--EXTENSIONS-- 4intl 5--FILE-- 6<?php 7 8ini_set("intl.error_level", E_WARNING); 9ini_set("intl.default_locale", "en_US"); 10 11$dtpg = new IntlDatePatternGenerator(); 12$dtpg2 = new IntlDatePatternGenerator("de_DE"); 13$dtpg3 = IntlDatePatternGenerator::create(); 14$dtpg4 = IntlDatePatternGenerator::create("de_DE"); 15 16echo $dtpg->getBestPattern("jjmm"), "\n"; 17echo $dtpg2->getBestPattern("jjmm"), "\n"; 18echo $dtpg3->getBestPattern("YYYYMMMdd"), "\n"; 19echo $dtpg4->getBestPattern("YYYYMMMdd"), "\n"; 20 21echo $dtpg->getBestPattern(""), "\n"; 22 23try { 24 $dtpg->getBestPattern(); 25} catch(\ArgumentCountError $e) { 26 echo $e->getMessage(), "\n"; 27} 28 29?> 30--EXPECT-- 31h:mm a 32HH:mm 33MMM dd, YYYY 34dd. MMM YYYY 35 36IntlDatePatternGenerator::getBestPattern() expects exactly 1 argument, 0 given 37