bug41964.phpt 929 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. --TEST--
  2. Bug #41964 (strtotime returns a timestamp for non-time string of pattern '(A|a) .+')
  3. --FILE--
  4. <?php
  5. date_default_timezone_set("UTC");
  6. error_reporting(0);
  7. $res = date_parse('Ask the Experts');
  8. var_dump($res['zone'], $res['tz_abbr']);
  9. echo "\n";
  10. $res = date_parse('A ');
  11. var_dump($res['zone'], $res['tz_abbr']);
  12. echo "\n";
  13. $res = date_parse('A');
  14. var_dump($res['zone'], $res['tz_abbr']);
  15. echo "\n";
  16. $res = date_parse('a ');
  17. var_dump($res['zone'], $res['tz_abbr']);
  18. echo "\n";
  19. $res = date_parse('a');
  20. var_dump($res['zone'], $res['tz_abbr']);
  21. echo "\n";
  22. $res = date_parse('A Revolution in Development');
  23. var_dump($res['zone'], $res['tz_abbr']);
  24. echo "\n";
  25. $res = date_parse('a nothing');
  26. var_dump($res['zone'], $res['tz_abbr']);
  27. echo "\n";
  28. ?>
  29. --EXPECT--
  30. NULL
  31. NULL
  32. int(3600)
  33. string(1) "A"
  34. int(3600)
  35. string(1) "A"
  36. int(3600)
  37. string(1) "A"
  38. int(3600)
  39. string(1) "A"
  40. int(3600)
  41. string(1) "A"
  42. int(3600)
  43. string(1) "A"