1--TEST-- 2IntlTimeZone::hasSameRules(): errors 3--SKIPIF-- 4<?php 5if (!extension_loaded('intl')) 6 die('skip intl extension not enabled'); 7--FILE-- 8<?php 9ini_set("intl.error_level", E_WARNING); 10 11function error_handler($errno, $errstr, $errfile, $errline) 12{ 13 var_dump($errno, $errstr); 14 return true; 15} 16set_error_handler("error_handler"); 17 18$tz = IntlTimeZone::createTimeZone('Europe/Lisbon'); 19var_dump($tz->hasSameRules('foo')); 20 21var_dump(intltz_has_same_rules(null, $tz)); 22 23--EXPECT-- 24int(4096) 25string(99) "Argument 1 passed to IntlTimeZone::hasSameRules() must be an instance of IntlTimeZone, string given" 26int(2) 27string(81) "IntlTimeZone::hasSameRules() expects parameter 1 to be IntlTimeZone, string given" 28int(2) 29string(66) "IntlTimeZone::hasSameRules(): intltz_has_same_rules: bad arguments" 30bool(false) 31int(4096) 32string(92) "Argument 1 passed to intltz_has_same_rules() must be an instance of IntlTimeZone, null given" 33int(2) 34string(74) "intltz_has_same_rules() expects parameter 1 to be IntlTimeZone, null given" 35int(2) 36string(61) "intltz_has_same_rules(): intltz_has_same_rules: bad arguments" 37bool(false) 38