doubang4881
doubang4881
2011-01-17 23:29
浏览 35
已采纳

如何计算PHP版本?

Silly question; I've been wanting to use Doctrine with CodeIgniter on a personal portfolio site, but Doctrine indicates that it needs PHP 5.2.3 or greater. I submitted a ticket to my hosting provider asking when they would be upgrading PHP (they were running 5.2.1). I just got a message saying they've updated to 5.2.12, which is greater than 5.2.3.

Is this true? I've looked at the php.net downloads page but it's hard to tell which is more recent. I think I may be misinterpreting 5.2.12 as 5.2.1.2 - obviously 12 is higher than 3, but is that how the versions are numbered?

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 邀请回答

4条回答 默认 最新

  • donqo88682
    donqo88682 2011-01-17 23:33
    已采纳

    Version 5.2.12 means:

    • Major version: 5
    • Minor version: 2
    • Release version: 12
    • Extra version: (empty)
    • Full version name: 5.2.12
    • Version ID: 50212

    ...and yes 5.2.12 is newer than 5.2.3 since 12 is higher than 3.

    点赞 评论
  • dongpa9277
    dongpa9277 2011-01-17 23:31

    What do you know, that's indeed true! Didn't know that myself, I was under the impression they were working with single numbers (i.e. 5.2.1.7, which also is a valid numbering scheme especially in the Unix/Linux world.)

    Version 5.2.17

    06-Jan-2011

    Version 5.2.16

    16-Dec-2010

    Version 5.2.15

    08-Dec-2010

    点赞 评论
  • dongsheng66783619
    dongsheng66783619 2011-01-17 23:32

    Perhaps you might find the version_compare() function useful

    点赞 评论
  • duanfu3634
    duanfu3634 2011-01-17 23:32

    See the changelog to understand the history.

    点赞 评论

相关推荐