donglu2523 2015-08-31 12:34 采纳率: 100%
浏览 43

PHP - 一个普通的PHP库应该基于哪个最新版本?

I am new in PHP with at most 1 month exp. And I am writing a PHP SDK for a cloud storage service and I am hoping not make any big mistakes so that most my target users (PHP developers) can use this SDK without trouble-shooting.

Now I am worrying about which version the SDK should be based on. PHP 5.3 is good with Namespace feature, and I can see AWS PHP SDK (http://aws.amazon.com/sdkforphp) is based on PHP 5.5. But I think the newer my SDK PHP version is, the less user will be able to use it because of backward compatibility.

So please tell me what is the convension in PHP version supporting? Or a more closed question: Is it a bad idea for my SDK to be based on PHP 5.3?

Thanks to @JohnConde and now I realized the real question should be which is the most used PHP version and it's already answered Which PHP 5 Version is most commonly used?.

  • 写回答

1条回答 默认 最新

  • dsk49208 2015-08-31 12:44
    关注

    I think many things have changed for the better with the new versions of php. Both in terms of resources and in terms of performance. Many fixes were also made. See the changelog: http://us3.php.net/ChangeLog-5.php

    Php 5.4 is two times faster What 5.3 (http://www.lornajane.net/posts/2012/proof-that-php-5-4-is-twice-as-fast-as-php-5 -3), the 5.5 is faster than the 5.4 and so on (http://www.lornajane.net/posts/2014/php-5-6-benchmarks).

    In terms of features and support for object orientation it is also much better. I recommend using at least version 5.5.9.

    I just upgraded two applications that ran with PHP 5.2 and are now with PHP 5.5.9. The effort was not big and the benefits were wonderful. Much faster now... and my very satisfied customers. In general, syntax changes become simpler code. Therefore, the effort was small. The code is much easier to read and future maintenance will be much easier and faster to implement.

    I hope this helps!

    评论

报告相同问题?

悬赏问题

  • ¥15 全部备份安卓app数据包括密码,可以复制到另一手机上运行
  • ¥15 Python3.5 相关代码写作
  • ¥20 测距传感器数据手册i2c
  • ¥15 RPA正常跑,cmd输入cookies跑不出来
  • ¥15 求帮我调试一下freefem代码
  • ¥15 matlab代码解决,怎么运行
  • ¥15 R语言Rstudio突然无法启动
  • ¥15 关于#matlab#的问题:提取2个图像的变量作为另外一个图像像元的移动量,计算新的位置创建新的图像并提取第二个图像的变量到新的图像
  • ¥15 改算法,照着压缩包里边,参考其他代码封装的格式 写到main函数里
  • ¥15 用windows做服务的同志有吗