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