Hi! Could we please enable some services and cookies to improve your experience and our website?

PHPize Online / SQLize Online  /  SQLtest Online

A A A
Login    Share code      Blog   FAQ

Online Sandbox for SQL and PHP: Write, Run, Test, and Share SQL Queries and PHP Code

Copy Format Clear

Stuck with a problem? Got Error? Ask AI support!

Copy Clear
Copy Format Clear
<?php $user_agent = $_SERVER['HTTP_USER_AGENT']; $timezone = null; if (preg_match('/\b(?:MSIE|Chrome|Safari|Firefox)\b/', $user_agent) && preg_match('/\(([^\)]+)\)/', $user_agent, $matches)) { $timezone = $matches[1]; } if ($timezone) { $timezone = str_replace(':', '', $timezone); date_default_timezone_set($timezone); } $pro_end ='1679846700'; $endTime = strtotime(date('H:i:s', $pro_end)); $sechas = strtotime(date('H:i:s')); $ostalos = round(abs($endTime - $sechas) / 60); $time_diff_ms = $ostalos * 60 * 1000; echo $time_diff_ms;
Copy Clear