1--TEST-- 2IntlTimeZone equals handler: error test 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 11class A extends IntlTimeZone { 12function __construct() {} 13} 14 15$tz = new A(); 16$tz2 = intltz_get_gmt(); 17var_dump($tz, $tz2); 18try { 19var_dump($tz == $tz2); 20} catch (Exception $e) { 21 var_dump(get_class($e), $e->getMessage()); 22} 23 24?> 25--EXPECT-- 26object(A)#1 (1) { 27 ["valid"]=> 28 bool(false) 29} 30object(IntlTimeZone)#2 (4) { 31 ["valid"]=> 32 bool(true) 33 ["id"]=> 34 string(3) "GMT" 35 ["rawOffset"]=> 36 int(0) 37 ["currentOffset"]=> 38 int(0) 39} 40string(9) "Exception" 41string(63) "Comparison with at least one unconstructed IntlTimeZone operand" 41