bug78383.phpt 440 B

123456789101112131415161718192021222324
  1. --TEST--
  2. Bug #78383: Casting a DateTime to array no longer returns its properties
  3. --FILE--
  4. <?php
  5. var_dump((array) new DateTime('2000-01-01 UTC'));
  6. var_dump((array) new DateTimeZone('Europe/Berlin'));
  7. ?>
  8. --EXPECT--
  9. array(3) {
  10. ["date"]=>
  11. string(26) "2000-01-01 00:00:00.000000"
  12. ["timezone_type"]=>
  13. int(3)
  14. ["timezone"]=>
  15. string(3) "UTC"
  16. }
  17. array(2) {
  18. ["timezone_type"]=>
  19. int(3)
  20. ["timezone"]=>
  21. string(13) "Europe/Berlin"
  22. }