bug38524.phpt 645 B

1234567891011121314151617181920212223242526272829303132333435
  1. --TEST--
  2. Bug #38524 (strptime() does not initialize the internal date storage structure)
  3. --SKIPIF--
  4. <?php
  5. if (!function_exists('strptime')) echo "SKIP";
  6. if (str_contains(PHP_OS, 'FreeBSD')) {
  7. die("skip strptime() behaves differently on FreeBSD");
  8. }
  9. ?>
  10. --FILE--
  11. <?php
  12. var_dump(strptime('2006-08-20', '%Y-%m-%d'));
  13. ?>
  14. --EXPECTF--
  15. Deprecated: Function strptime() is deprecated in %s on line %d
  16. array(9) {
  17. ["tm_sec"]=>
  18. int(0)
  19. ["tm_min"]=>
  20. int(0)
  21. ["tm_hour"]=>
  22. int(0)
  23. ["tm_mday"]=>
  24. int(20)
  25. ["tm_mon"]=>
  26. int(7)
  27. ["tm_year"]=>
  28. int(106)
  29. ["tm_wday"]=>
  30. int(0)
  31. ["tm_yday"]=>
  32. int(%d)
  33. ["unparsed"]=>
  34. string(0) ""
  35. }