timezone_clone_basic.phpt 865 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. --TEST--
  2. IntlTimeZone clone handler: basic test
  3. --SKIPIF--
  4. <?php
  5. if (!extension_loaded('intl'))
  6. die('skip intl extension not enabled');
  7. --FILE--
  8. <?php
  9. ini_set("intl.error_level", E_WARNING);
  10. $tz1 = IntlTimeZone::createTimeZone('Europe/Amsterdam');
  11. print_r($tz1);
  12. print_r(clone $tz1);
  13. //clone non-owned object
  14. $gmt = IntlTimeZone::getGMT();
  15. print_r($gmt);
  16. print_r(clone $gmt);
  17. ?>
  18. ==DONE==
  19. --EXPECTF--
  20. IntlTimeZone Object
  21. (
  22. [valid] => 1
  23. [id] => Europe/Amsterdam
  24. [rawOffset] => 3600000
  25. [currentOffset] => %d
  26. )
  27. IntlTimeZone Object
  28. (
  29. [valid] => 1
  30. [id] => Europe/Amsterdam
  31. [rawOffset] => 3600000
  32. [currentOffset] => %d
  33. )
  34. IntlTimeZone Object
  35. (
  36. [valid] => 1
  37. [id] => GMT
  38. [rawOffset] => 0
  39. [currentOffset] => 0
  40. )
  41. IntlTimeZone Object
  42. (
  43. [valid] => 1
  44. [id] => GMT
  45. [rawOffset] => 0
  46. [currentOffset] => 0
  47. )
  48. ==DONE==