Php:如何将日期时间字符串转换为UNIX时间


Php: How to convert a datetime string to UNIX time

我有一个日期时间字符串,格式为:

2015-03-02T04:46:48+01:00 

并且我需要将其转换为UNIX时间(整数类型)(几乎所有的研究结果都是关于将UNIX时间转换为日期时间字符串,太可悲了)。请帮忙。谢谢大家!

使用strtotime:

 echo strtotime('2015-03-02T04:46:48+01:00');

将返回:

1456890408