File:
[ELWIX - Embedded LightWeight unIX -] /
embedaddon /
php /
ext /
date /
tests /
strtotime-mysql-64bit.phpt
Revision
1.1.1.1 (vendor branch):
download - view:
text,
annotated -
select for diffs -
revision graph
Tue Feb 21 23:47:54 2012 UTC (12 years, 6 months ago) by
misho
Branches:
php,
MAIN
CVS tags:
v5_4_3elwix,
v5_4_29p0,
v5_4_29,
v5_4_20p0,
v5_4_20,
v5_4_17p0,
v5_4_17,
v5_3_10,
HEAD
php
--TEST--
strtotime() and mysql timestamps (64 bit)
--SKIPIF--
<?php echo PHP_INT_SIZE != 8 ? "skip 64-bit only" : "OK"; ?>
--FILE--
<?php
date_default_timezone_set('UTC');
/* Format: YYYYMMDDHHMMSS */
$d[] = '19970523091528';
$d[] = '20001231185859';
$d[] = '20800410101010'; // overflow..
foreach($d as $date) {
$time = strtotime($date);
if (is_integer($time)) {
var_dump(date('r', $time));
} else {
var_dump($time);
}
}
?>
--EXPECT--
string(31) "Fri, 23 May 1997 09:15:28 +0000"
string(31) "Sun, 31 Dec 2000 18:58:59 +0000"
string(31) "Wed, 10 Apr 2080 10:10:10 +0000"
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>