3v4l.org

run code in 300+ PHP versions simultaneously
<?php $sec = 1; $getcurrentDate = date("Y-m-d H:i:s", time()); $finaldate = strtotime ( '+'.$sec.' second', strtotime ($getcurrentDate)); echo $finaldate; $getcurrentDate = date("Y-m-d H:i:s", gmmktime() +18000); $finaldate = strtotime ( '+'.$getcurrentDate.' day', strtotime ($getcurrentDate)) ; $finaldate = date ( 'Y-m-j H:i:s' , $finaldate); echo $finaldate; ?>
Output for 7.0.0 - 7.0.20, 7.1.0 - 7.1.20, 7.2.0 - 7.2.6
1372983639 Deprecated: gmmktime(): You should be using the time() function instead in /in/G5C2J on line 8 1970-01-1 01:00:00
Output for 5.1.0 - 5.1.2, 5.2.4 - 5.2.17, 5.3.0 - 5.3.29, 5.4.0 - 5.4.45, 5.5.0 - 5.5.38, 5.6.0 - 5.6.28
1372983639 Strict Standards: gmmktime(): You should be using the time() function instead in /in/G5C2J on line 8 1970-01-1 01:00:00
Output for 5.1.3 - 5.1.6, 5.2.0 - 5.2.3
1372983639 Strict Standards: gmmktime(): You should be using the time() function instead in /in/G5C2J on line 8 2013-07-4 13:07:38
Output for 4.3.0 - 4.3.11, 4.4.0 - 4.4.9, 5.0.3 - 5.0.5
13729836391970-01-1 00:59:59
Output for 5.0.0 - 5.0.2
13729752011970-01-1 00:59:59

preferences:
156 ms | 401 KiB | 217 Q