3v4l.org

run code in 300+ PHP versions simultaneously
<?php $strvalidstart = '2014-01-22'; $strpointbal = '1640.0000'; /* this section for emember num days */ // $strvalidstart = "2012-03-01"; // debug $emember_numdays = 0; $param_day_multiplier = 24 * 60 * 60; $stremember_finaldate = ""; if ($strvalidstart != "") { $curr_timestamp = time(); $start_timestamp = strtotime($strvalidstart); if (floatval($strpointbal) <= 0) { // if no receipts / no points, start counting from current date $start_timestamp = $curr_timestamp; } $timediff = $curr_timestamp - $start_timestamp; // $end_timestamp = $start_timestamp + (90 * $param_day_multiplier); /* modified by ZY 13 Jul 2012, calc 3 months on the exact day */ $end_yy = intval(date("Y", $curr_timestamp)); $end_mm = intval(date("m", $curr_timestamp)); $end_dd = intval(date("d", $curr_timestamp)); if ($end_mm >= 10) { $end_yy++; $end_mm = $end_mm + 3 - 12; } else { $end_mm = $end_mm + 3; } $end_timestamp = strtotime($end_yy ."-". $end_mm ."-". $end_dd); $leapyear_flag = date("L", $end_timestamp); $totaldays_array = $this->array_totaldays_in_month(); $strkey = strval($end_mm); $month_totaldays = $totaldays_array[$strkey]; if ($end_mm == 2 && strval($leapyear_flag) == "1") { $month_totaldays = "29"; } $month_totaldays = intval($month_totaldays); if ($end_dd > $month_totaldays) { // if end-day is larger than total num of days in this month, set end-day to the last day of month $end_dd = $month_totaldays; } $end_timestamp = strtotime($end_yy ."-". $end_mm ."-". $end_dd); $emember_numdays = floor($timediff / $param_day_multiplier); if ($emember_numdays < 0) { $emember_numdays = 0; } else { $emember_numdays = 90 - $emember_numdays; if ($emember_numdays < 0) $emember_numdays = 0; } $stremember_finaldate = date("d-M-Y", $end_timestamp); } $strfinal_emember_numdays = $emember_numdays; // $strfinal_emember_numdays = $strvalidstart ." , ". $emember_numdays ." days"; // debug /* modified by ZY 6 Aug 2012, show - if no receipts */ if (floatval($strpointbal) <= 0) { // if no receipts / no points, change to dash $stremember_finaldate = "-"; }

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)
7.3.10.0210.00316.23
7.3.00.0070.01316.56
7.2.130.0160.00716.61
7.2.120.0030.01416.48
7.2.110.0190.00616.80
7.2.100.0220.00016.64
7.2.90.0150.01117.00
7.2.80.0160.01317.18
7.2.70.0190.00516.79
7.2.60.0120.00917.00
7.2.50.0180.01116.57
7.2.40.0070.01116.80
7.2.30.0110.01116.96
7.2.20.0180.00616.29
7.2.10.0140.00916.65
7.2.00.0120.00618.32
7.1.250.0160.00415.45
7.1.200.0060.00616.02
7.1.100.0060.00318.38
7.1.70.0000.01117.27
7.1.60.0070.01619.70
7.1.50.0270.01035.15
7.1.00.0000.08022.57
7.0.200.0170.00314.89
7.0.140.0070.07321.94
7.0.100.0000.06319.92
7.0.90.0130.07319.96
7.0.80.0130.04319.84
7.0.70.0130.07319.98
7.0.60.0100.07719.84
7.0.50.0100.08320.32
7.0.40.0100.06320.09
7.0.30.0030.08320.10
7.0.20.0070.05319.95
7.0.10.0100.08020.14
7.0.00.0170.07320.02
5.6.280.0000.07321.02
5.6.250.0070.08020.69
5.6.240.0130.07320.68
5.6.230.0100.06020.49
5.6.220.0130.06720.45
5.6.210.0130.07720.71
5.6.200.0030.09021.02
5.6.190.0030.09021.09
5.6.180.0070.06021.04
5.6.170.0070.05321.05
5.6.160.0100.08320.95
5.6.150.0100.07021.04
5.6.140.0100.06021.05
5.6.130.0070.06021.09
5.6.120.0030.05321.05
5.6.110.0030.07021.03
5.6.100.0130.06721.07
5.6.90.0070.05320.95
5.6.80.0100.07720.35
5.6.70.0070.08320.44
5.6.60.0070.05020.38
5.6.50.0130.06720.52
5.6.40.0130.06720.40
5.6.30.0070.05320.48
5.6.20.0070.06020.39
5.6.10.0000.05320.32
5.6.00.0030.05720.52
5.5.380.0170.06320.38
5.5.370.0130.07020.32
5.5.360.0170.07020.30
5.5.350.0100.08320.38
5.5.340.0100.08020.81
5.5.330.0130.08020.89
5.5.320.0100.06320.86
5.5.310.0000.06320.74
5.5.300.0070.05720.84
5.5.290.0100.08020.88
5.5.280.0100.06720.75
5.5.270.0100.07720.79
5.5.260.0270.07020.89
5.5.250.0030.06320.72
5.5.240.0030.07020.17
5.5.230.0130.05720.18
5.5.220.0030.05020.30
5.5.210.0070.06720.28
5.5.200.0070.04320.00
5.5.190.0000.06320.09
5.5.180.0070.08020.22
5.5.160.0100.08020.14
5.5.150.0130.06720.21
5.5.140.0130.07319.99
5.5.130.0000.05020.18
5.5.120.0030.05019.95
5.5.110.0000.04720.27
5.5.100.0070.04320.18
5.5.90.0070.04720.11
5.5.80.0030.06320.17
5.5.70.0100.07020.15
5.5.60.0100.07320.06
5.5.50.0130.07020.06
5.5.40.0130.07320.06
5.5.30.0070.06020.10
5.5.20.0200.05720.11
5.5.10.0100.05019.99
5.5.00.0030.06720.06
5.4.450.0070.08019.43
5.4.440.0170.07719.37
5.4.430.0070.08319.35
5.4.420.0070.06319.46
5.4.410.0170.06719.22
5.4.400.0100.06318.98
5.4.390.0170.07018.98
5.4.380.0100.07318.90
5.4.370.0030.06719.03
5.4.360.0030.06318.96
5.4.350.0070.06319.10
5.4.340.0100.07719.12
5.4.320.0130.07018.78
5.4.310.0130.06319.23
5.4.300.0030.08019.03
5.4.290.0030.04018.80
5.4.280.0200.04718.94
5.4.270.0070.04719.12
5.4.260.0000.04319.04
5.4.250.0070.05318.81
5.4.240.0070.07719.19
5.4.230.0070.06019.09
5.4.220.0070.07719.09
5.4.210.0000.07319.07
5.4.200.0070.06019.05
5.4.190.0070.07319.02
5.4.180.0070.07719.08
5.4.170.0070.07719.02
5.4.160.0170.06719.01
5.4.150.0100.04019.02
5.4.140.0070.06316.26
5.4.130.0070.06016.12
5.4.120.0070.04716.26
5.4.110.0070.04316.43
5.4.100.0030.07716.43
5.4.90.0070.05016.41
5.4.80.0130.05016.38
5.4.70.0100.05316.34
5.4.60.0100.05716.31
5.4.50.0030.07716.14
5.4.40.0170.06016.33
5.4.30.0000.08016.38
5.4.20.0130.06716.20
5.4.10.0070.04316.20
5.4.00.0070.03715.47
5.3.290.0100.04314.67
5.3.280.0000.05714.60
5.3.270.0030.07714.61
5.3.260.0070.04314.57
5.3.250.0130.06714.59
5.3.240.0200.06714.46
5.3.230.0100.05314.44
5.3.220.0070.07714.42
5.3.210.0070.07314.41
5.3.200.0170.06014.56
5.3.190.0170.05714.54
5.3.180.0070.08014.58
5.3.170.0070.05314.56
5.3.160.0200.05314.43
5.3.150.0070.08714.57
5.3.140.0100.07314.41
5.3.130.0070.07714.55
5.3.120.0100.07314.52
5.3.110.0030.07714.52
5.3.100.0070.04013.91
5.3.90.0070.07313.98
5.3.80.0000.06313.99
5.3.70.0100.03313.99
5.3.60.0100.07013.96
5.3.50.0130.06013.87
5.3.40.0170.05713.95
5.3.30.0100.07013.86
5.3.20.0030.06313.70
5.3.10.0130.06313.44
5.3.00.0030.07013.61
5.2.170.0070.06011.94
5.2.160.0100.05711.94
5.2.150.0070.06311.94
5.2.140.0000.05011.94
5.2.130.0030.04011.94
5.2.120.0130.05711.94
5.2.110.0070.06011.94
5.2.100.0100.03311.94
5.2.90.0100.04011.94
5.2.80.0130.05311.94
5.2.70.0100.05711.94
5.2.60.0100.05711.94
5.2.50.0030.06711.94
5.2.40.0070.06311.94
5.2.30.0070.06011.94
5.2.20.0100.05311.94
5.2.10.0070.05011.94
5.2.00.0100.05711.94
5.1.60.0030.03011.94
5.1.50.0200.03711.94
5.1.40.0030.03311.94
5.1.30.0070.05311.94
5.1.20.0070.05311.94
5.1.10.0070.05311.94
5.1.00.0100.04711.94
5.0.50.0000.04011.94
5.0.40.0030.04711.94
5.0.30.0000.07011.94
5.0.20.0030.03011.94
5.0.10.0100.02711.94
5.0.00.0070.05011.94
4.4.90.0000.03011.94
4.4.80.0030.02311.94
4.4.70.0030.03711.94
4.4.60.0070.01311.94
4.4.50.0030.03011.94
4.4.40.0000.05311.94
4.4.30.0000.03711.94
4.4.20.0000.03711.94
4.4.10.0030.02311.94
4.4.00.0030.04711.94
4.3.110.0030.03011.94
4.3.100.0100.02011.94
4.3.90.0030.03711.94
4.3.80.0000.05011.94
4.3.70.0030.03311.94
4.3.60.0070.03011.94
4.3.50.0000.03311.94
4.3.40.0030.05011.94
4.3.30.0030.03011.94
4.3.20.0030.03011.94
4.3.10.0000.03711.94
4.3.00.0000.02711.94

preferences:
35.84 ms | 400 KiB | 5 Q