Doc #80279 [NEW]: DateTime::format / date_format: Mismatch between signature and "return values"

From: Date: Fri, 23 Oct 2020 20:27:02 +0000
Subject: Doc #80279 [NEW]: DateTime::format / date_format: Mismatch between signature and "return values"
Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-18029@lists.php.net to get a copy of this message
From:             php-bugs at allenjb dot me dot uk
Operating system: n/a
PHP version:      Irrelevant
Package:          Documentation problem
Bug Type:         Documentation Problem
Bug description:DateTime::format / date_format: Mismatch between signature and "return
values"

Description:
------------
---
From manual page: https://php.net/datetime.format
---

The signature says this function always returns string. The
documentation also mentions (and I've confirmed) that unrecognized
values (eg 'f') are returned 'as-is'.

The Return Values section however says the function may "return FALSE on
failure".

I can't think of any circumstances in which this function would fail.
I've glanced at the php-src code and think it probably should never
return false, but would like someone more familiar with the code to
confirm.

If the function may return FALSE, in addition to fixing the signature
return type, could the Return Values section be expanded to give an
example of when this function may fail.


-- 
Edit bug report at https://bugs.php.net/bug.php?id=80279&edit=1
-- 
Fix committed:                    https://bugs.php.net/fix.php?id=80279&r=fixed
Fixed in release:                 https://bugs.php.net/fix.php?id=80279&r=alreadyfixed
Need backtrace:                   https://bugs.php.net/fix.php?id=80279&r=needtrace
Need Reproduce Script:            https://bugs.php.net/fix.php?id=80279&r=needscript
Try newer version:                https://bugs.php.net/fix.php?id=80279&r=oldversion
Not developer issue:              https://bugs.php.net/fix.php?id=80279&r=support
Expected behavior:                https://bugs.php.net/fix.php?id=80279&r=notwrong
Not enough info:                  https://bugs.php.net/fix.php?id=80279&r=notenoughinfo
Submitted twice:                  https://bugs.php.net/fix.php?id=80279&r=submittedtwice
register_globals:                 https://bugs.php.net/fix.php?id=80279&r=globals
PHP version support discontinued: https://bugs.php.net/fix.php?id=80279&r=phptooold
Daylight Savings:                 https://bugs.php.net/fix.php?id=80279&r=dst
IIS Stability:                    https://bugs.php.net/fix.php?id=80279&r=isapi
Install GNU Sed:                  https://bugs.php.net/fix.php?id=80279&r=gnused
Floating point limitations:       https://bugs.php.net/fix.php?id=80279&r=float
No Zend Extensions:               https://bugs.php.net/fix.php?id=80279&r=nozend
MySQL Configuration Error:        https://bugs.php.net/fix.php?id=80279&r=mysqlcfg


Thread (3 messages)

« previous php.doc.bugs (#18029) next »