💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、星火、月之暗面及文生图 广告
~~~ $d = "2013-03-26 15:30:10"; $d1 = "2013-03-26 18:40:10"; function minDiff($startTime, $endTime) {     $start =strtotime($startTime);     $end =strtotime($endTime);     $timeDiff = $end -$start; //case "y": $retval = bcdiv($diff,(60 * 60 * 24 * 365)); break; //case "m": $retval = bcdiv($diff,(60 * 60 * 24 * 30)); break; //case "w": $retval = bcdiv($diff,(60 * 60 * 24 * 7)); break; //case "d": $retval = bcdiv($diff,(60 * 60 * 24)); break; //case "h": $retval = bcdiv($diff,(60 * 60)); break; //case "n": $retval = bcdiv($diff,60); break;    //return floor($timeDiff / (60 * 60 *24));//计算天数     return floor($timeDiff /60);//差幾分鐘 } echo dateDiff($d,$d1) ~~~