[php-src] Issue #9627: gmdate () 1st parameter type is wrong, but there is no error.

From: Date: Wed, 28 Sep 2022 10:17:41 +0000
Subject: [php-src] Issue #9627: gmdate () 1st parameter type is wrong, but there is no error.
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-242478@lists.php.net to get a copy of this message
Issue: https://github.com/php/php-src/issues/9627 Author: kitrio ### Description The following code: ```php <?php //Bug Test function timestampToDate(int $time){ var_dump($time); echo gmdate($time); // if forgot format } timestampToDate(19000); // 7.0 ~ 8.2rc1 ``` Resulted in this output: ``` int(19000) //var_dump 19000 ``` But I expected this output instead: ``` int(19000) //var_dump Fatal error: Uncaught TypeError: gmdate() expects parameter 1 to be string, int given ``` According to PHP.net document (gmdate function) description gmdate(string $format, ?int $timestamp = null): string why any occur error? without string type format document is worng? ### PHP Version PHP 7.0~ 8.0 ### Operating System Ubuntu 20.04

« previous php.bugs (#242478) next »