Hello internal,
I've been going through the documentation again to remove mentions of PHP 4 and found some extensions, functions, etc. on which I'd like to know the state of them and if it would be wise to deprecate them.
I know I've thrown in some function aliases again, but only those which I think wouldn't have widespread usage. If those should still be kept in your opinion please let me know.
The list are more rough notes that I took while reading the doc so if something seems unclear let me know.
- ob_gzhandler, it says in a note that zlib.output_compression https://www.php.net/manual/en/zlib.configuration.php#ini.zlib.output-compression is preferred. [1] Moreover, it is poorly documented
- the enable_dl directive, it is said that "This deprecated feature will certainly be removed in the future." [x] is this the case already? addressed in the Deprecation for 7.4 draft RFC [2]
- ini_alter an alias of ini_set [3]
- Deprecate the mode argument in zip_entry_open as it is ignored and always "rb" [4]
- Deprecate the use_shortnames argument of openssl_csr_get_public_key as it is ignored [5]
- odbc_do — Alias of odbc_exec() ; odbc_field_precision — Alias of odbc_field_len()
https://www.php.net/manual/en/function.odbc-field-len.php - rewinddir returns null on success and false on failure which is an odd behavior but I suppose it was kept like that due to BC concerns.
- The
FILE_USE_INCLUDE_PATHconstant in the Filesystem extension being an integer makes it unusable with strict types forfile_get_contents()[6] however it is also used for a flag argument where it can be combined with other constants with a binary OR [7] [8]. Should this be just considered a Doc Bug? - The Enchant extension is bundled with PHP as of PHP 5.3 [9] however it seems its license is LGPL-2.1 [10] isn't this clashing with the PHP License?
- PharData::setAlias, PharData::setDefaultStub and PharData::setStub always throw PharException
https://www.php.net/manual/en/class.pharexception.php [11] [12] [13] - user_error — Alias of
trigger_error()in the Error Handling extension - show_source — Alias of
highlight_file()
https://www.php.net/manual/en/function.highlight-file.php in Misc Functions -
GLOB_AVAILABLE_FLAGSis used internally to check for malformed glob flags [14] but it isn't really documented [15] [16] - Deprecate the NoRewindIterator class in the SPL extension as it seems pretty useless [17]
- stream_register_wrapper — Alias of
stream_wrapper_register()https://www.php.net/manual/en/function.stream-wrapper-register.php in Stream Extension - Deprecate the stream_set_timeout function in favour of stream_select as " This function doesn't work with advanced operations like
stream_socket_recvfrom()
https://www.php.net/manual/en/function.stream-socket-recvfrom.php, usestream_select()
https://www.php.net/manual/en/function.stream-select.php with timeout parameter instead" [18] - Change print return's type from int to void as it always returns 1 [19] to mimic echo [20] or maybe mimic printf's behavior i.e. the length of the string printed [21]
- Deprecate the ftp_site function in favour of ftp_raw as
ftp_site()does not return the response from the server which isn't really practical as can be seen on these two notes [22][23] - ftp_quit — Alias of
ftp_close()
https://www.php.net/manual/en/function.ftp-close.php - Unbundle the NSAPI Extension (if this is already the case, there is doc error in the membership state of the extension) as it seems obsolete in this day and age as it handles Sun/Netscape servers [24]
- socket_getopt — Alias of
socket_get_option()and socket_setopt — Alias ofsocket_set_option()
https://www.php.net/manual/en/function.socket-set-option.php - Unbundle the XML-RPC extension as it is considered experimental [25]
Best regards
George P. Banyard
[1] https://www.php.net/manual/en/function.ob-gzhandler.php [x] https://www.php.net/manual/en/info.configuration.php [2] https://wiki.php.net/rfc/deprecations_php_7_4 [3] https://www.php.net/manual/en/function.ini-alter.php [4] https://www.php.net/manual/en/function.zip-entry-open.php [5] https://www.php.net/manual/en/function.openssl-csr-get-public-key.php [6] https://www.php.net/manual/en/function.file-get-contents.php [7] https://www.php.net/manual/en/function.file-put-contents.php [8] https://www.php.net/manual/en/function.file.php [9] https://www.php.net/manual/en/enchant.installation.php [10] https://github.com/AbiWord/enchant
[11] https://www.php.net/manual/en/phardata.setalias.php [12] https://www.php.net/manual/en/phardata.setdefaultstub.php [13] https://www.php.net/manual/en/phardata.setstub.php [14] https://github.com/php/php-src/blob/master/ext/standard/dir.c#L192 [15] https://www.php.net/manual/en/filesystem.constants.php [16] https://www.php.net/manual/en/function.glob.php [17] https://www.php.net/manual/en/class.norewinditerator.php [18]
https://www.php.net/manual/en/function.stream-set-timeout.php#refsect1-function.stream-set-timeout-notes [19] https://www.php.net/manual/en/function.print.php [20] https://www.php.net/manual/en/function.echo.php [21] https://www.php.net/manual/en/function.printf.php [22] https://www.php.net/manual/en/function.ftp-site.php#86838 [23] https://www.php.net/manual/en/function.ftp-site.php#26907 [24] https://www.php.net/manual/en/book.nsapi.php [25] https://www.php.net/manual/en/intro.xmlrpc.php