mirror of
https://github.com/php/php-src.git
synced 2024-12-11 19:04:38 +08:00
4b64dbb9a1
pattern '(A|a) .+'). - MFH: Fixed bug #41844 (Format returns incorrect number of digits for negative years -0001 to -0999). - MFH: Fixed bug #41842 (Cannot create years < 0100 & negative years with date_create or new DateTime). - MFH: Fixed bug #41709 (strtotime() does not handle 00.00.0000). - MFH: Fixed bug #41523 (strtotime('0000-00-00 00:00:00') is parsed as 1999-11-30).
60 lines
923 B
PHP
60 lines
923 B
PHP
--TEST--
|
|
Bug #41964 (strtotime returns a timestamp for non-time string of pattern '(A|a) .+')
|
|
--FILE--
|
|
<?php
|
|
date_default_timezone_set("UTC");
|
|
|
|
error_reporting(0);
|
|
|
|
$res = date_parse('Ask the Experts');
|
|
var_dump($res['zone'], $res['tz_abbr']);
|
|
echo "\n";
|
|
|
|
$res = date_parse('A ');
|
|
var_dump($res['zone'], $res['tz_abbr']);
|
|
echo "\n";
|
|
|
|
$res = date_parse('A');
|
|
var_dump($res['zone'], $res['tz_abbr']);
|
|
echo "\n";
|
|
|
|
$res = date_parse('a ');
|
|
var_dump($res['zone'], $res['tz_abbr']);
|
|
echo "\n";
|
|
|
|
$res = date_parse('a');
|
|
var_dump($res['zone'], $res['tz_abbr']);
|
|
echo "\n";
|
|
|
|
$res = date_parse('A Revolution in Development');
|
|
var_dump($res['zone'], $res['tz_abbr']);
|
|
echo "\n";
|
|
|
|
$res = date_parse('a nothing');
|
|
var_dump($res['zone'], $res['tz_abbr']);
|
|
echo "\n";
|
|
|
|
|
|
?>
|
|
--EXPECT--
|
|
NULL
|
|
NULL
|
|
|
|
int(-60)
|
|
string(1) "A"
|
|
|
|
int(-60)
|
|
string(1) "A"
|
|
|
|
int(-60)
|
|
string(1) "A"
|
|
|
|
int(-60)
|
|
string(1) "A"
|
|
|
|
int(-60)
|
|
string(1) "A"
|
|
|
|
int(-60)
|
|
string(1) "A"
|