php strtotime(日期(“Y-m-d h:i:s”)的输出编号表示什么?

php strtotime(日期(“Y-m-d h:i:s”)的输出编号表示什么?,php,Php,我想找出链接发送时间和链接激活时间之间的15分钟差异。为此,我如下所示 <?php $sentTime=strtotime(date("2018-05-29 06:11:42")); $curTime=strtotime(date("Y-m-d h:i:s")); $difference=$curTime-$sentTime; echo $sentTime; echo '<br>'; echo $curTime; echo '<br>'; echo $diffe

我想找出链接发送时间和链接激活时间之间的15分钟差异。为此,我如下所示

<?php

$sentTime=strtotime(date("2018-05-29 06:11:42"));
$curTime=strtotime(date("Y-m-d h:i:s"));
$difference=$curTime-$sentTime;

echo $sentTime;
echo '<br>';
echo $curTime;
echo '<br>';
echo $difference;
?>

当我这样做的时候,它会给出一些数字, 那些数字是多少? 如果是时间,是以分、秒还是毫秒为单位

有人能帮我吗?

该函数返回一个时间戳,即自1970年1月1日(UTC)以来经过的秒数


$sentTime
$curTime
$difference
都是秒。

请这样使用,这是声明日期的正确方式

  $senttime= date("Y-m-d H:i:s",strtotime("2018-05-29 06:11:42"));

为什么不检查一下函数定义?Php手册仅用于此目的:-被否决,因为它不回答OP的问题,并且不欢迎在没有解释的情况下给出代码,因此不会帮助任何人。