简体   繁体   English

PHP5.3有什么问题?

[英]What is wrong with PHP5.3?

I came across lots of hosting companies are unwilling to upgrade to PHP5.3. 我遇到很多托管公司都不愿意升级到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. 他们中的大多数人给我的理由是PHP5.3中存在很多错误,因此他们更喜欢将其保留在5.2版本。

What is wrong with v5.3 then? 那么v5.3有什么问题呢? 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!? 或者他们只是不愿意升级!?

  • 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. IIRC在第一个PHP 5.3.0发布时,字节码缓存尚未准备好并适用于新的ABI和Zend_core更改。 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. 然后真的有太少的用户请求,因为不是很多代码依赖于5.3功能。
  • A few compatibility breaks exist (there were some WP and Drupal issues, but most of the issues are exaggerated). 存在一些兼容性缺陷 (存在一些WP和Drupal问题,但大多数问题都被夸大了)。

And so most shared hosters have no incentive to upgrade existing servers. 因此大多数共享托管商都没有动力升级现有服务器。

For sure is not the only reason, but this (little) change has created a lot of problems in CMS like drupal: 肯定不是唯一的原因,但这个(小)改变在CMS中产生了很多问题,比如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);. 从PHP 5.3.0开始,当您在foo(&$ a);中使用&时,您将收到一条警告,指出“call-time pass-by-reference”已弃用。

Quoted from PHP: Passing by Reference 引用自PHP:通过引用传递

So, probably the first hosting companies moving to php 5.3 had been flooded by support requests coming from little (and unexperienced) web managers. 因此,可能是第一批迁移到php 5.3的托管公司充斥着来自小(和没有经验的)网络管理员的支持请求。

Hence, I suppose other companies decided to wait for a more stable situation... 因此,我想其他公司决定等待更稳定的情况......

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. 这不是php 5.3的错误,但它会通过吐出通知和弃用警告来指出应用程序代码中的不良做法。

So when old php libraries are used, you'll probably see a lot of error messages, which could be perceived as bugs. 因此,当使用旧的PHP库时,您可能会看到很多错误消息,这可能被视为错误。

PHP 5.3.0 was released on 30 June 2009, and 5.2 is no longer officially supported by php.net. PHP 5.3.0于2009年6月30日发布,php.net不再正式支持5.2。 If your hosting company doesn't step up, it's time to switch. 如果您的托管公司没有加强,那么是时候切换了。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM