10

We have a number of tags on the site for PHP minor releases. While it is true that PHP does not follow semantic versioning correctly and there are a number of differences between each version, I started to question the usefulness of these tags on Stack Overflow recently.

PHP 5 has reached its end of life in December 2018 and now with the release of PHP 8 the manual for PHP 5 will be archived. Anything before PHP 7.3 will no longer be supported and all existing development should upgrade as soon as possible to a supported release. [1]

People often misuse version tags by tagging only with the minor tag without the main thus leaving the question to rot in the dark corners of the site. Usually, the tag has no significance other than it being the version OP is currently testing the software on. There are legitimate uses of version-tags e.g. asking about a new feature or a workaround for a removed feature.

We have currently following PHP tags:

Suggested options:

  1. Leave the tags alone and continue creating new ones for PHP 8.1 and so on. This is unlikely to contribute to the quality of this site from what I have already observed.
  2. Leave only PHP major version tags. is already gone so we would need to delink it from and then merge minor tags into this one. This is likely to be even less useful than option 1 since tagging with the major version in PHP adds no information at all to the question. Minor versions differ so much that one tag for all PHP 5 version will serve no purpose. Same for PHP 7, 8 and so on.
  3. Merge all these tags into but keep only the ones which have not reached its end of life yet. This will be a burden because each year we would need to merge one more tag into the main language tag. This will also not improve the site's quality in any way.
  4. Merge all PHP 5-* tags into and keep PHP 7-* and 8 as is. Since PHP 5 is long gone and we expect almost 0 new questions to be asked about that release it would make sense to merge them all into the language tag. Once PHP 7 reaches its EOL we would do the same for PHP 7.
  5. Merge all these tags into . I find it somewhat useful to follow questions tagged with PHP 8 or PHP 7.4 but only with these versions. These might be novel questions, which have not been asked on Stack Overflow yet. However, the version information can also be contained in the body of the question, but it would make it more difficult to follow.

What are your opinions how to deal with the minor PHP tags?

21
  • 2
    Do the minor versions really differ so much from each other that the major version adds "adds no information at all to the question."? Commented Sep 27, 2020 at 17:23
  • 2
    @CertainPerformance Yes, kinsta.com/blog/php-7-4 The point being is that if you tag a question with PHP 7 only then we have no idea why. As in the major tag version gives us no additional information. At least this is my opinion.
    – Dharman Mod
    Commented Sep 27, 2020 at 17:25
  • 20
    Anything before PHP 7.3 will no longer be supported and all existing development should upgrade as soon as possible to a supported release - meanwhile in the real world, upgrading to newer versions should be done as soon as someone pays for it.
    – Nigel Ren
    Commented Sep 28, 2020 at 6:57
  • 32
    Do not remove or merge them, there still will be people in 2035 needing to find those answers.
    – user11153
    Commented Sep 28, 2020 at 8:48
  • 9
    In addition to that there will be (foolish) people using PHP5.* in 2035, there will also be people who are using PHP12.* (or whatever it is then) in 2035. Those users should be able to easily see (from the tags) that an answer from 2020 is for PHP 5.* and thus know it is unlikely relevant to their question. Tags aren't just useful to tell people it's relevant to their problem, but also to know it's not relevant. Someone using PHP5.*, for example, would be unable to use a lot of SQL Server related answers for PHP7.* as the functions are completely different Something similar will happen again.
    – Thom A
    Commented Sep 28, 2020 at 10:40
  • 1
    Do we really need the same question asked but for "php 5.3", "5.4" , "7.1", etc.? Isn't there a bounty that literally says "The current answer(s) are out-of-date and require revision given recent changes."? Why would SO require 1 question for each version of the software instead of 1 question for any version and answers identifying which versions they work best. Example of this: html.
    – Braiam
    Commented Sep 28, 2020 at 13:36
  • 1
    @Braiam People don't ask the same question for each version. Questions are tagged with specific version because they are asking about a feature only available in that version. e.g. stackoverflow.com/questions/62983592/…
    – Dharman Mod
    Commented Sep 28, 2020 at 13:38
  • @Dharman that feature will not be available in later version? I knew php was bad, but that's a whole another level. A feature introduced in php 8 would not be available on 9.
    – Braiam
    Commented Sep 28, 2020 at 13:41
  • It will be available but it is not available at the moment. If someone finds that question in the future they will see that it only refers to the feature that was made available since PHP 8.0.
    – Dharman Mod
    Commented Sep 28, 2020 at 13:42
  • 2
    I'd like to point out, that PHP's EOL is not equivalent to "not supported any more". Ubuntu still supports PHP 7.0 with its LTS version (Cent OS 7 even supports 5.3). See this comment: github.com/composer/composer/issues/8785#issuecomment-673038230
    – R. Horber
    Commented Sep 28, 2020 at 13:45
  • @R.Horber Does it mean you can still install it or are they actively fixing bugs in these old releases?
    – Dharman Mod
    Commented Sep 28, 2020 at 13:50
  • @Dharman ok, let me see if we get this straight, this tag would only be useful as long as php8 is the latest version, correct? Afterwards you must reevaluate all questions to see if they are still only relevant to php8? Why? What would be the purpose? Why can't OP say "I'm using php 8" in the body and be done with it?
    – Braiam
    Commented Sep 28, 2020 at 13:51
  • 1
    @Braiam Yes, that is why I asked this question. I am asking if it makes sense to have these version and merge them later on into main PHP tag or if they are still useful even when PHP drops support for the old release. You can say which version you are using in the body of the question but it is easier to find questions about new features when they are tagged properly.
    – Dharman Mod
    Commented Sep 28, 2020 at 13:53
  • That's way too into theory. To put that question into perspective, nobody would ask that, but would ask instead "Compare multiple values in PHP", or "How to handle ranges on php", etc. Rarely someone asks "how to use this that works instead of this that may not work".
    – Braiam
    Commented Sep 28, 2020 at 14:49
  • 3
    @Dharman Both, you can install them (for Ubuntu 16.04, which is LTS, the default is PHP 7.0), and they do at least security fixes: changelogs.ubuntu.com/changelogs/pool/main/p/php7.0/…. Eidt: About CentOS I'm not sure, because I'm not using it.
    – R. Horber
    Commented Sep 28, 2020 at 15:43

9 Answers 9

63

I don't understand the logic of merging tags once versions become EOL. Since version-specific tags should always have the base language tag as well, "merging into " in practice means "deleting the tag from all questions which have it".

If a question is "how do I use this new feature in PHP 5.3?" (or 7.3, or 8.3), the question doesn't change after PHP 5.3 becomes EOL, it just becomes less relevant to most users. If the version tag was appropriate when the question was created, what value does it have to go in years later and delete it?

So really I see only two options:

  • Continue using version tags, but remove them from questions where they're not adding any value, and ensure the main tag is also present.
  • Remove all version-specific tags, including and immediately.

Personally, I think that while version tags would be much more useful with better software support (e.g. automatically adding the base tag, or treating them as "sub-tags" rather than requiring both), there is still some value in them for some questions, so they should remain as an option.

32

I think there is value in keeping a tag which represents all the PHP5 versions. There are questions that relate to PHP5 that have no value to someone using PHP7 or PHP8 as the functionality in PHP5 has been removed/replaced in those versions, and seeing a tag on a search result might allow a user to quickly discard that. Since the tag has already been merged into tag, I would propose merging all the php-5.* minor version tags into a php-5.x tag and adopting that strategy for php-7.* (including ) when PHP7 goes EOL.

I think minor version tags should be kept for non-EOL versions. Minor versions frequently have changes which are not always backward compatible with the prior minor version (as can be seen from the number of Implemented messages in the changelog), or result in code producing errors/warnings that it didn't previously. I would also still be supportive of keeping the major version tag for non-EOL versions though, as most changes do occur between major versions, and questions can be equally valid for all minor versions (and obviously it's impossible to tag with all minor versions).

In terms of synonyms, It seems all non-EOL versions should be synonyms of so that questions with only the minor version show up to people hunting for the tag.

7
  • 6
    [php5] was merged into [php] 8 years ago. But [php-5.x] might have some merit. That's how python-3.x works at any rate
    – Machavity Mod
    Commented Sep 28, 2020 at 12:15
  • Agreed. If minor version tags were deleted (or merged, whatever, but essentially vanished)... Would someone manually curate each affected post to ensure that the question isn't relevant to that particular version before the tag is nixed? If not, and if the PHP version weren't mentioned in the post body, this would lead to loss of relevant information in determining the applicability of a question/answer.
    – Markus AO
    Commented Sep 28, 2020 at 18:51
  • @Machavity you'll have to put that down to me being a (relative) newbie. I think the idea of a php-5.x is probably a better way of dealing with the minor versions, as it can show that the question was related to a specific version in the past.
    – Nick
    Commented Sep 28, 2020 at 23:26
  • 2
    The difference between PHP 5.3 and 5.4 is not so big (a few syntax changes, utf-8 by default and deprecating mysql_* functions), but between 5.2 and 5.3 is quite massive. Lots of syntax changes still used in PHP 7.x and up came from PHP 5.3. I don't know if it is a good idea to mesh it all up, like Python. Commented Sep 30, 2020 at 16:39
  • @IsmaelMiguel I have made that point about version differences, and it is the main point of IMSoP's answer. Our only real difference in thinking is that I think old minor version tags should be merged for versions that are no longer supported, and shouldn't really be used any more.
    – Nick
    Commented Sep 30, 2020 at 22:27
  • 2
    @Nick They can't be merged. Important content and very crucial differences are lost by merging the tags. Without very careful design, your code may or may not work on recent and/or old versions. For example, using the mysql_* functions automatically forbids you from using anything past PHP 5.6. Using $array = [] to create arrays limits your code to PHP 5.4+, using $this inside anonymous functions as well. Merging tags will make it look like it's all the same. That PHP 5.0, 5.1, 5.2, 5.3, 5.4, 5.5 and 5.6 are the same. They aren't. There's too much of a difference between versions. Commented Sep 30, 2020 at 22:41
  • @IsmaelMiguel I understand that, I wrote in my answer "Minor versions frequently have changes which are not always backward compatible with the prior minor version", but I still don't see any value in keeping minor version tags for versions that people shouldn't be using any more. You obviously agree with IMSoP, so upvote their answer and downvote mine. That's the whole point of meta...
    – Nick
    Commented Sep 30, 2020 at 23:01
15

For current development, it make sense to be able to get answers to the latest versions of PHP and know you are working with the best up to date knowledge.
The problem is that there are probably a lot of sites still out there running older versions of PHP and most will either never be updated and just patched up occasionally or (even worse) just receive updates to their current code.

Not 100% sure of how accurate the information on https://w3techs.com/technologies/details/pl-php is, but the graph on there shows (as of date of posting this)...

enter image description here

IMHO, to maintain the usefulness of the site to all those unfortunate enough to have to find specific answers to PHP 5 versions of the code it is important to keep some idea of what answers are relevant to PHP 5.

And a breakdown of the sites on Version 5 (from https://w3techs.com/technologies/details/pl-php/5)...

enter image description here

As others have suggested, maintaining a group for PHP 5 is good, but as there are important features that vary between even subversions of PHP 5, I would think that is is helpful to be able to look for specific versions still.

1
  • 2
    Absolutely this answer Nigel. As a hoster/dev who had to manage no less than six different subversions of PHP 5 there were enough oddities and breaking changes in PHP 5 sub versions for them to be considered first class versions in and off themselves.
    – Kev
    Commented Sep 28, 2020 at 18:15
11

As a hoster/developer who had to manage no less than six different subversions of PHP 5 there were enough oddities and breaking changes in those PHP 5 minor versions for them to be considered first class versions in and of themselves.

I would wholeheartedly recommend option one and leaving these tags well alone (but perhaps they should also have the php tag as well).

Even now I still have to deal with all sorts of messes that are specific to these minor versions. In these cases the minor version tags have been useful in ferreting out changes in behaviour without initially having to trawl the PHP changelogs.

Sure yes, these users should upgrade, but that's not my decision to make.

2
  • 1
    I completely agree with this. The amount of people I know that still run some version of PHP 5 makes me think that those tags are still relevant today. Commented Sep 29, 2020 at 21:55
  • 1
    "still relevant today." - yes, and importantly, relevant at the time the question was asked (obviously). Removing the version-specific tag can drastically change the question (and render existing "correct" answers as arguably incorrect). - Would just make it confusing for everyone.
    – MrWhite
    Commented Sep 30, 2020 at 16:02
7

I think we still get a lot of PHP 5 questions, they're just not tagged as such. We sometimes find out that they're PHP 5 questions when the OP says the answer doesn't work for them and it turns out that's true because it uses some cutting edge language feature from eight years ago, or when they eventually say that the code+error that they posted only started happening after they changed hosts. I'm not here as often as I used to be, but pretty much every time I browse new questions there's still someone using the old mysql extension.

I have mixed feelings about the benefit of the minor version tags, though. There are some pretty significant differences between some of the 5 versions, particularly 5.2 to 5.3. Unfortunately, often when someone could benefit from adding the version tag, they don't do it because they don't realize that one of those differences is actually the cause of their problem.

Still, if someone who is aware of the differences wants to ask a question about a problem they need to solve using their particular old version, the tag could be useful information to an answerer, so overall I'm in favor of keeping them, even if they're not useful very often. I definitely agree with you about the necessity of the main php tag in addition to the version tag, but I think there are probably enough people that watch php-* that the questions that omit it won't go unnoticed. We should always be adding that tag if we notice it's missing, regardless of what happens to the minor version tags.

5

I'm working on legacy, busted PHP 5 that we will never have the bandwidth to upgrade, nor does it have very long to live in terms of the SDLC.

Why couldn't I tag my questions with PHP 5 if I needed help in PHP 5 where an answer that goes like "upgrade your PHP and then we'll help" is equivalent to spitting in my face??

7
  • Questions on Stack Overflow are supposed to have a lasting value. Your question might be useful to a handful of people or maybe only you. There are tags like legacy-code which you could use to ask a question about patching legacy application but what good would it do for the rest of us to have the question tagged with a particular PHP version?
    – Dharman Mod
    Commented Sep 28, 2020 at 16:38
  • 9
    Perhaps I'm not the only person in IT who's stuck in this position where they know they should update PHP, but they can't. But to put a more precise point to this - questions about PHP 5 that are on the site that I lean on do provide lasting value to me, even in this day and age, given that I still have to put up with it. It is highly presumptuous to assume that, just because a technology is EOL, that also means that the experts who work in it also mystically evaporate.
    – Makoto
    Commented Sep 28, 2020 at 16:49
  • Just to emphasise this I am not talking about deleting such questions or stopping accepting them. We are discussing here the value of minor tags. I assume from your stance that you think such tags are useful and we should continue maintaining them a.k.a. option 1, right?
    – Dharman Mod
    Commented Sep 28, 2020 at 16:54
  • 2
    You're going to run into a circumstance of someone "wanting" to help but being unable to because they're unfamiliar with the idioms or idiosyncrasies of an older version of PHP. So, it makes sense to make that as known as possible.
    – Makoto
    Commented Sep 28, 2020 at 18:13
  • 1
    Do you expect to do changes to this system before it is shut off? Why do you believe that SO isn't willing to help you or that the hypothetical question has not already been asked and answered?
    – Braiam
    Commented Sep 29, 2020 at 1:02
  • 1
    @Braiam: I'm making changes to the system now, and someone comes along and thinks that, just because the technology is EOL that also means that no one is asking explicit questions about it.
    – Makoto
    Commented Sep 29, 2020 at 14:40
  • 1
    Who is saying that? We are talking about a tag, which, let me remember you, existence or not of the tag isn't a indication of topically. You can still ask your questions an mention in the body that your are using PHP 5 with the tag [php].
    – Braiam
    Commented Sep 29, 2020 at 14:48
4

Sometimes the minor version number is relevant information specific to a particular problem. Sometimes only the major version number is relevant. Sometimes it really doesn't matter at all.

I reckon people don't really invest a whole lot of brainpower into evaluating if their problem is version-specific or not. (And none of us has time to curate whether a minor version tags are relevant to a post.) However, in cases where OP's issue is version-specific, I'd rather see the version number up-front, than have to ask for it to confirm my suspicions. (OP might also add it to post body, but does that happen much, vs. version indicated via tags?)

I'd like to suggest the following, first on minor tags:

  • Keep all existing PHP minor version tags
  • OR Merge them with the major version tag
  • BUT only if the version number is ported into the post body.

Then, on major tags:

  • Keep all existing PHP major version tags
  • Alias/syndicate minor version tags to major versions (ie. I might want to follow the PHP 7 tag to keep tabs on the current version, but not 7.x in particular).

And, in the future, keep creating minor version tags to provide a facility (aside post body) for indicating version-specific concerns. (With editors removing them when irrelevant.)

Posts with only PHPx or PHPx.x tags should also be syndicated to the vanilla PHP tag to ensure PHP-tag followers get the whole scoop when posters forget/don't think to to add the main tag. (Perhaps it should be auto-included when a versioned tag is used?)


The following is basically a feature-request. It's included here as a possible outside-the-box device for deprecating version-specific tags without loss of (facilities for communicating and finding) relevant information. Will make a dedicated post on it soon enough.

Then, on facilitating the availability of debugging information:

  • Could we have extra fields in the question form, where one could add specs/meta on the language, version, platform etc. used, where relevant? This is probably a separate topic to explore, but I find the lack of relevant specs frustrating, and a specs-section (behind a toggle?) might encourage users to provide more relevant context.
  • If this were implemented, including a "language version" field, which would be available as a search criteria (and possibly followable analogous to tags) -- then PHP version-specific tags would become redundant, and could be merged with the main PHP tag.
  • For good measure, what I'd personally implement yesterday, should I be the master commander of the overflowing stacks:

▼ Debugging Details
Language: __PHP__ Version: __7.4.1__
[x] Question specific to this version

Additionally, it seems that consistency is a virtue in handling this between version-specific tags for different languages. Does anyone have a summary of them to share for reference?

2
  • 4
    The second half of this answer is basically a new feature request - one I'd support, but one which has no chance of being seen by anyone who can do anything about it buried here.
    – IMSoP
    Commented Sep 28, 2020 at 20:51
  • @IMSoP yes that it is. I'll revise and enlarge into a new post when I find a moment. Meanwhile, I'll leave it hanging here as is, with a leading disclaimer.
    – Markus AO
    Commented Sep 28, 2020 at 21:36
2

“What version PHP are you using?”

“I tagged it.”

“It’s just tagged PHP”

“WTH happened to my tags???”

-5

I like option 4 but I would merge all of the minor PHP 7 tags into the php-7. As you say, once PHP 7 goes EOL merge it into PHP.

1
  • 1
    Between 7.0, 7.1, 7.2, 7.3 and 7.4 are major differences and patches. It would be nice if everybody would tag his version. Commented Sep 30, 2020 at 12:23

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .