Is it possible to switch in PHP based on version?

前端 未结 4 1213
一生所求
一生所求 2021-01-25 17:48

I have a function in one of my PHP scripts that relies on version 5.3 to run.

I thought that if it was in a function that didn\'t happen to get called when run on a serv

4条回答
  •  长发绾君心
    2021-01-25 18:35

    Have a look at the PHP predefined constants. They include several constants that define the running version. You could use that to decide which version of a script to load.

提交回复
热议问题