timezone_equals_basic.phpt 758 B

123456789101112131415161718192021222324252627282930313233
  1. --TEST--
  2. IntlTimeZone equals 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 = intltz_create_time_zone('Europe/Lisbon');
  11. $tz2 = intltz_create_time_zone('Europe/Lisbon');
  12. echo "Comparison to self:\n";
  13. var_dump($tz1 == $tz1);
  14. echo "Comparison to equal instance:\n";
  15. var_dump($tz1 == $tz2);
  16. echo "Comparison to equivalent instance:\n";
  17. var_dump($tz1 == intltz_create_time_zone('Portugal'));
  18. echo "Comparison to GMT:\n";
  19. var_dump($tz1 == intltz_get_gmt());
  20. ?>
  21. ==DONE==
  22. --EXPECT--
  23. Comparison to self:
  24. bool(true)
  25. Comparison to equal instance:
  26. bool(true)
  27. Comparison to equivalent instance:
  28. bool(false)
  29. Comparison to GMT:
  30. bool(false)
  31. ==DONE==