mirror of
https://github.com/php/php-src.git
synced 2026-04-16 20:41:18 +02:00
PHP requires integer typehints to be written "int" and does not allow "integer" as an alias. This changes type error messages to match the actual type name and avoids confusing messages like "must be of the type integer, integer given".
21 lines
461 B
PHP
21 lines
461 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, int given in %s on line %d
|