对于php 5.1,有没有替代date_parse函数.*?

use*_*472 6 php

我必须使用php函数date_parse但它支持5.2..那么有什么替代功能date_parse for php 5.1..

Sto*_*bor 6

strtotime,可能与getdate,localtimegmtime结合使用

getdate(strtotime("20 Jan 2009"));
Run Code Online (Sandbox Code Playgroud)

strtotime接受一个字符串,并将其转换为unix时间戳,其他三个函数将unix时间戳转换为类似date_parse的数组.


Bab*_*ker 0

不知道您所说的替代方案到底是什么意思,但请检查一下:

php.net getdate()

提示:向左看,您会看到相关功能。