Adam Adam - 10 months ago 56
PHP Question

How to find out if a method is deprecated?

For example, I would like to find out if the function

is deprecated.

In the English manual, it seems not marked as deprecated. This is also true for all other languages, except in German, Chinese and Spanish - there it is marked as deprecated.

How can I find out which manual is correct? Can I find maybe a history of the manual? So that I can see if it was once marked as deprecated and then the note was removed again?

Answer Source

To answer the immediate question - yes, the manual once had it marked deprecated and that was removed. The problem was reported in bug #71367 and fixed in January this year, though apparently not in all translations.

Note that this was a "soft" deprecation, meaning that an E_DEPRECATED runtime notice was not raised when the function was used - it was only mentioned in the manual.

To get a manual entry's history:

On each page underneath the "Change language" dropdown selector there is an "Edit" link:

Edit link

Follow it to open PHP's online docbook editor, where you'll be greeted with a login prompt. Click Anonymous login and it'll load up the editor for that page.

On the bar separating the panels click the expander:

Tools expander

And in the panel that opens hit the reload button in the "Log" tab:

Load log

which'll let you read the changelog and perform diffs between revisions: