1--TEST-- 2GH-8115 (Can't catch deprecation in IntlDateFormatter) 3--EXTENSIONS-- 4intl 5--FILE-- 6<?php 7 8error_reporting(E_ALL); 9set_error_handler(function ($errNo, $errStr) { 10 echo "Caught ($errNo): $errStr\n"; 11}); 12try { 13 new \IntlDateFormatter(null, null, null); 14} catch (\IntlException) {} 15try { 16 new \IntlRuleBasedBreakIterator(null, null); 17} catch (\IntlException) {} 18// Can't be tested since all params are optional 19new \IntlGregorianCalendar(null, null); 20new \Collator(null); 21// Can't be tested since all params are optional 22new \IntlDatePatternGenerator(null); 23new \NumberFormatter(null, null); 24try { 25 new \MessageFormatter(null, null); 26} catch (\IntlException) {} 27new \ResourceBundle(null, null, null); 28 29?> 30--EXPECT-- 31Caught (8192): IntlDateFormatter::__construct(): Passing null to parameter #2 ($dateType) of type int is deprecated 32Caught (8192): IntlDateFormatter::__construct(): Passing null to parameter #3 ($timeType) of type int is deprecated 33Caught (8192): IntlRuleBasedBreakIterator::__construct(): Passing null to parameter #1 ($rules) of type string is deprecated 34Caught (8192): IntlRuleBasedBreakIterator::__construct(): Passing null to parameter #2 ($compiled) of type bool is deprecated 35Caught (8192): Collator::__construct(): Passing null to parameter #1 ($locale) of type string is deprecated 36Caught (8192): NumberFormatter::__construct(): Passing null to parameter #1 ($locale) of type string is deprecated 37Caught (8192): NumberFormatter::__construct(): Passing null to parameter #2 ($style) of type int is deprecated 38Caught (8192): MessageFormatter::__construct(): Passing null to parameter #1 ($locale) of type string is deprecated 39Caught (8192): MessageFormatter::__construct(): Passing null to parameter #2 ($pattern) of type string is deprecated 40Caught (8192): ResourceBundle::__construct(): Passing null to parameter #3 ($fallback) of type bool is deprecated 41