3v4l.org

run code in 300+ PHP versions simultaneously
<?php $chat_session = "1449675645"; $ts = "15:40:50"; // 5 segundos de diferencia $datetime = date('Y-m-d', $chat_session) . " " . $ts; date_default_timezone_set('GMT'); $datetime_unix = strtotime($datetime); echo "inicio : $chat_session\n"; echo "respuesta : $datetime_unix\n"; echo "diferencia seg : " . (int)$datetime_unix - (int)$chat_session;
Output for 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.19, 8.3.0 - 8.3.7
inicio : 1449675645 respuesta : 1449675650 diferencia seg : 5
Output for 7.4.0 - 7.4.33
Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /in/v1AlK on line 14 inicio : 1449675645 respuesta : 1449675650 Warning: A non-numeric value encountered in /in/v1AlK on line 14 -1449675645
Output for 7.1.0 - 7.1.33, 7.2.0 - 7.2.33, 7.3.0 - 7.3.33
inicio : 1449675645 respuesta : 1449675650 Warning: A non-numeric value encountered in /in/v1AlK on line 14 -1449675645
Output for 5.5.0 - 5.5.38, 5.6.0 - 5.6.40, 7.0.0 - 7.0.33
inicio : 1449675645 respuesta : 1449675650 -1449675645

preferences:
245.75 ms | 402 KiB | 332 Q