Doc #79686 [NEW]: Nullable type hints are undocumented
From: me at jfr dot im
Operating system: N/A
PHP version: Irrelevant
Package: Documentation problem
Bug Type: Documentation Problem
Bug description:Nullable type hints are undocumented
Description:
------------
Hi there,
Searching Google for "php type hints" leads me to
https://www.php.net/manual/en/language.oop5.typehinting.php,
which leads
to
https://www.php.net/manual/en/functions.arguments.php#functions.arguments.type-declaration,
which does not document '?type' hints, and documents that nullable
arguments should be specified by a 'type $var = NULL', which is an
exception to soon-deprecated behavior
(https://github.com/php/php-src/blob/master/UPGRADING#L148).
(In fact, that deprecation indicated that it was 'sometimes used' in
'older PHP versions', as though it isn't the only solution documented!)
(Also, searching the PHP web site for 'type hints' returns no relevant
results)
--
Edit bug report at https://bugs.php.net/bug.php?id=79686&edit=1
--
Fix committed: https://bugs.php.net/fix.php?id=79686&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=79686&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=79686&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=79686&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=79686&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=79686&r=support
Expected behavior: https://bugs.php.net/fix.php?id=79686&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=79686&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=79686&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=79686&r=globals
PHP version support discontinued: https://bugs.php.net/fix.php?id=79686&r=phptooold
Daylight Savings: https://bugs.php.net/fix.php?id=79686&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=79686&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=79686&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=79686&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=79686&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=79686&r=mysqlcfg
Thread (2 messages)
- me at jfr dot im