php-src/ext/date/tests/date_timestamp_get.phpt
Derick Rethans 68a7fec7af Make DateTime and DateTimeImmutable siblings.
They both implement the DateTimeInterface interface, which specifies the
non-modifying methods of DateTime/DateTimeImmutable.
2013-03-31 10:37:16 +01:00

21 lines
465 B
PHP

--TEST--
DateTime: Test correct setup and correct DateTime parameter to date_timestamp_get()
--CREDITS--
Havard Eide <nucleuz@gmail.com>
#PHPTestFest2009 Norway 2009-06-09 \o/
--INI--
date.timezone=UTC
--FILE--
<?php
$tz = date_timestamp_get(new DateTime());
var_dump(is_int($tz));
echo "\n\n";
$tz = date_timestamp_get(time());
?>
--EXPECTF--
bool(true)
Warning: date_timestamp_get() expects parameter 1 to be DateTimeInterface, integer given in %s on line %d