mirror of
https://github.com/php/php-src.git
synced 2026-03-29 19:52:20 +02:00
14 lines
328 B
PHP
14 lines
328 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');
|
|
try {
|
|
var_dump(strtotime('-1 month', $d));
|
|
} catch (TypeError $e) {
|
|
echo $e->getMessage(), "\n";
|
|
}
|
|
?>
|
|
--EXPECTF--
|
|
strtotime() expects parameter 2 to be int, object given
|