mirror of
https://github.com/php/php-src.git
synced 2026-04-17 21:11:02 +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".
19 lines
501 B
PHP
19 lines
501 B
PHP
--TEST--
|
|
Check the function date_timestamp_set() with second parameter wrong (array).
|
|
--CREDITS--
|
|
Rodrigo Prado de Jesus <royopa [at] gmail [dot] com>
|
|
--INI--
|
|
date.timezone = UTC;
|
|
date_default_timezone_set("America/Sao_Paulo");
|
|
--FILE--
|
|
<?php
|
|
$dftz021 = date_default_timezone_get(); //UTC
|
|
|
|
$dtms021 = new DateTime();
|
|
|
|
$wrong_parameter = array();
|
|
|
|
date_timestamp_set($dtms021, $wrong_parameter);
|
|
?>
|
|
--EXPECTF--
|
|
Warning: date_timestamp_set() expects parameter 2 to be int, array given in %s on line %d
|