3v4l.org

run code in 300+ PHP versions simultaneously
<?php //function correct_date_format( $parms ){ //$date = DateTime::createFromFormat( 'm/d/Y' , $parms[3] ); //$date_val = $date->format('d-m-Y'); // $EXCEL_DATE = $parms[3]; // $UNIX_DATE = ($EXCEL_DATE - 25569) * 86400; // $date = gmdate("d-m-Y H:i:s", $UNIX_DATE); $dateTime = ExcelToPHP(44320); $days = floor($dateTime / 86400); $time = round((($dateTime / 86400) - $days) * 86400); $hours = round($time / 3600); $minutes = round($time / 60) - ($hours * 60); $seconds = round($time) - ($hours * 3600) - ($minutes * 60); $dateObj = date_create('1-Jan-1970+'.$days.' days'); $dateObj->setTime($hours,$minutes,$seconds); return $dateObj; //$pod = pods( $parms[1], $parms[2] )->add($parms[0], $dateObj ); //} function ExcelToPHP($dateValue = 0) { if (self::$ExcelBaseDate == self::CALENDAR_WINDOWS_1900) { $myExcelBaseDate = 25569; // Adjust for the spurious 29-Feb-1900 (Day 60) if ($dateValue < 60) { --$myExcelBaseDate; } } else { $myExcelBaseDate = 24107; } // Perform conversion if ($dateValue >= 1) { $utcDays = $dateValue - $myExcelBaseDate; $returnValue = round($utcDays * 86400); if (($returnValue <= PHP_INT_MAX) && ($returnValue >= -PHP_INT_MAX)) { $returnValue = (integer) $returnValue; } } else { $hours = round($dateValue * 24); $mins = round($dateValue * 1440) - round($hours * 60); $secs = round($dateValue * 86400) - round($hours * 3600) - round($mins * 60); $returnValue = (integer) gmmktime($hours, $mins, $secs); } // Return return $returnValue; } // function ExcelToPHP()

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
5.6.80.0170.07320.41
5.6.70.0300.07320.51
5.5.240.0030.04020.38
5.4.400.1030.05318.50
5.4.390.1000.05718.61
5.4.380.1070.05318.75
5.4.370.1100.05318.74
5.4.360.1200.06018.78
5.4.350.1170.05718.48
5.4.340.0970.06318.83
5.4.320.1130.05018.85
5.4.310.1070.05018.50
5.4.300.1170.05718.61
5.4.290.1100.06318.50
5.4.280.1170.05718.56
5.4.270.1130.06018.61
5.4.260.1270.06718.77
5.4.250.1170.05718.58
5.4.240.1070.05018.72
5.4.230.1100.05318.61
5.4.220.1000.06018.46
5.4.210.1030.05718.52
5.4.200.1000.05716.71
5.4.190.1070.05018.73
5.4.180.1000.05718.55
5.4.170.1200.05718.57
5.4.160.1000.06018.73
5.4.150.1030.05718.88
5.4.140.1070.05316.20
5.4.130.1270.06716.30
5.4.120.1300.06716.30
5.4.110.1270.06016.21
5.4.100.1070.05016.27
5.4.90.1170.06016.29
5.4.80.1100.05716.42
5.4.70.1100.05016.15
5.4.60.1430.07016.41
5.4.50.1330.06016.16
5.4.40.1100.05016.20
5.4.30.1000.06316.16
5.4.20.1170.05016.26
5.4.10.1100.05716.41
5.4.00.1070.05315.65
5.3.290.1030.05714.70
5.3.280.1130.05714.77
5.3.270.1200.05014.70
5.3.260.1230.07714.63
5.3.250.1330.06314.83
5.3.240.1030.05314.59
5.3.230.1130.05314.70
5.3.220.1100.05014.62
5.3.210.1130.05714.57
5.3.200.1370.06014.73
5.3.190.1130.05714.67
5.3.180.1070.05014.55
5.3.170.1170.05014.62
5.3.160.1170.04314.68
5.3.150.1100.07314.69
5.3.140.1070.07314.73
5.3.130.1170.05014.54
5.3.120.1070.05314.62
5.3.110.1070.05314.58
5.3.100.1070.05314.07
5.3.90.0970.05714.03
5.3.80.1200.05314.09
5.3.70.1030.05714.12
5.3.60.1070.05714.13
5.3.50.1070.06314.01
5.3.40.1000.05314.00
5.3.30.1100.04714.08
5.3.20.1100.04313.73
5.3.10.1370.05713.88
5.3.00.1130.05713.66
5.2.170.0870.04311.27
5.2.160.0970.04311.39
5.2.150.0830.05011.20
5.2.140.0870.04011.28
5.2.130.0800.04311.23
5.2.120.0830.04311.14
5.2.110.0800.04311.14
5.2.100.0900.04711.22
5.2.90.0870.04011.11
5.2.80.0800.04711.21
5.2.70.0900.04011.17
5.2.60.0930.03711.18
5.2.50.0930.03311.03
5.2.40.0700.04011.07
5.2.30.0830.03711.04
5.2.20.0830.05310.95
5.2.10.0830.03310.89
5.2.00.0700.04010.86
5.1.60.0800.03010.20
5.1.50.0670.04010.18
5.1.40.0730.03710.03
5.1.30.0970.04310.45
5.1.20.0700.03710.41
5.1.10.0870.04010.28
5.1.00.0770.03010.13
5.0.50.0300.0378.70
5.0.40.0370.0308.44
5.0.30.0400.0478.42
5.0.20.0430.0408.21
5.0.10.0330.0308.23
5.0.00.0400.0408.20
4.4.90.0400.0175.94
4.4.80.0400.0306.02
4.4.70.0400.0305.93
4.4.60.0400.0205.95
4.4.50.0470.0135.98
4.4.40.0400.0376.02
4.4.30.0430.0275.88
4.4.20.0370.0235.96
4.4.10.0300.0275.96
4.4.00.0430.0336.04
4.3.110.0330.0275.91
4.3.100.0400.0205.93
4.3.90.0400.0175.86
4.3.80.0300.0375.82
4.3.70.0330.0205.81
4.3.60.0330.0235.83
4.3.50.0370.0205.89
4.3.40.0330.0375.84
4.3.30.0270.0174.68
4.3.20.0200.0204.68
4.3.10.0200.0204.68
4.3.00.0000.0236.87

preferences:
134.97 ms | 1398 KiB | 7 Q