php-src/ext/date/tests/bug70245.phpt
Gabriel Caruso ce1d69a1f6 Use int instead of integer in type errors
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".
2018-02-04 19:08:23 +01:00

11 lines
308 B
PHP

--TEST--
Bug #70245 (strtotime does not emit warning when 2nd parameter is object or string)
--FILE--
<?php
$d = new DateTime('2011-01-15 00:00:00');
var_dump(strtotime('-1 month', $d));
?>
--EXPECTF--
Warning: strtotime() expects parameter 2 to be int, object given in %sbug70245.php on line %d
bool(false)