10

I came across lots of hosting companies are unwilling to upgrade to PHP5.3. Most of them gave me the reason is that there are lots of bugs in PHP5.3, so they prefer to keep it at version 5.2.

What is wrong with v5.3 then? is that true what they said - lots of bugs? I haven't come across any bugs on my local server!

Or are they just unwilling to upgrade!?

hakre
  • 193,403
  • 52
  • 435
  • 836
Run
  • 54,938
  • 169
  • 450
  • 748

3 Answers3

9
  • IIRC the bytecode caches were not ready and adapted for the new ABIs and Zend_core changes when the very first PHP 5.3.0 was released. That's meanwhile solved, but the suspicion sticks.
  • Then there's too few user requests really, since not a whole lot of code depends on 5.3 features yet.
  • A few compatibility breaks exist (there were some WP and Drupal issues, but most of the issues are exaggerated).

And so most shared hosters have no incentive to upgrade existing servers.

mario
  • 144,265
  • 20
  • 237
  • 291
  • Interesting. That realpath thingy is likely to break some apps... But 5.3 is so filled with goodness like Namespaces and advanced `DateTime` stuff that it's really a shame not to upgrade – Pekka Feb 19 '11 at 16:27
  • 3
    There are lots of allurements to upgrade. The http extension, closures, the date stuff, the ternary shorthand, __callStatic, maybe even goto. But the namespaces are sort of an anti-reason for some (maybe to hosters too). – mario Feb 19 '11 at 16:33
  • `goto` -- serious? (You are, I just looked this up!) I didn't know a language could actively devolve. I would say that counts as a reason *not* to upgrade :-( –  Feb 19 '11 at 19:26
  • @pst: It has limited practical use; and it's factually only a label-break. People just get cranky about the name. It's intended as micro optimization like SplFixedArray. – mario Feb 19 '11 at 19:33
  • Sadly, **it is not just a "labeled break"** (this implies that it can only "return" to a junction with a previous "named construct" such as a for-each or block, etc). Look at the example: http://php.net/manual/en/control-structures.goto.php ... I guess at least it's not [COMEFROM](http://en.wikipedia.org/wiki/COMEFROM) –  Feb 19 '11 at 19:40
5

For sure is not the only reason, but this (little) change has created a lot of problems in CMS like drupal:

Note: There is no reference sign on a function call - only on function definitions. Function definitions alone are enough to correctly pass the argument by reference. As of PHP 5.3.0, you will get a warning saying that "call-time pass-by-reference" is deprecated when you use & in foo(&$a);.

Quoted from PHP: Passing by Reference

So, probably the first hosting companies moving to php 5.3 had been flooded by support requests coming from little (and unexperienced) web managers.

Hence, I suppose other companies decided to wait for a more stable situation...

digEmAll
  • 56,430
  • 9
  • 115
  • 140
2

It's not php 5.3 that 's buggy, but it will point out bad practices in application-code by spitting out notices and deprecation warnings.

So when old php libraries are used, you'll probably see a lot of error messages, which could be perceived as bugs.

PHP 5.3.0 was released on 30 June 2009, and 5.2 is no longer officially supported by php.net. If your hosting company doesn't step up, it's time to switch.

Bob Fanger
  • 28,949
  • 7
  • 62
  • 78