3v4l.org

run code in 300+ PHP versions simultaneously
<?php /* 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.4.10.0130.00316.61
7.4.00.0090.00815.83
7.3.130.0150.00316.37
7.3.120.0050.01315.64
7.3.110.0090.00715.50
7.3.100.0110.00315.59
7.3.90.0030.00815.67
7.3.80.0030.01115.65
7.3.70.0050.00915.54
7.3.60.0040.00915.65
7.3.50.0080.00815.64
7.3.40.0090.00515.64
7.3.30.0060.00615.47
7.3.20.0050.00817.28
7.3.10.0100.00517.42
7.3.00.0080.00917.26
7.2.260.0130.00716.46
7.2.250.0040.01615.70
7.2.240.0060.00815.72
7.2.230.0050.01215.66
7.2.220.0070.00815.73
7.2.210.0050.01015.55
7.2.200.0110.00115.75
7.2.190.0020.01115.69
7.2.180.0050.01215.64
7.2.170.0070.00515.73
7.2.160.0030.01016.41
7.2.150.0060.01318.21
7.2.140.0130.00718.20
7.2.130.0120.00618.30
7.2.120.0120.00418.24
7.2.110.0040.01218.43
7.2.100.0110.00418.32
7.2.90.0110.00718.13
7.2.80.0060.00818.30
7.2.70.0060.00918.14
7.2.60.0100.00018.33
7.2.50.0060.01018.26
7.2.40.0100.01018.30
7.2.30.0000.01918.43
7.2.20.0100.00318.35
7.2.10.0000.01618.43
7.2.00.0040.01018.88
7.1.330.0070.00716.52
7.1.320.0070.00516.60
7.1.310.0090.00516.73
7.1.300.0030.00816.45
7.1.290.0030.00916.57
7.1.280.0070.00516.46
7.1.270.0030.00816.50
7.1.260.0020.01216.38
7.1.250.0080.00417.18
7.1.240.0060.00617.03
7.1.230.0060.00617.14
7.1.220.0000.00917.38
7.1.210.0080.00317.01
7.1.200.0030.01217.15
7.1.190.0040.00817.26
7.1.180.0080.00617.20
7.1.170.0040.01117.40
7.1.160.0090.00617.37
7.1.150.0040.01517.15
7.1.140.0030.01017.06
7.1.130.0030.01217.15
7.1.120.0080.00817.32
7.1.110.0030.00917.43
7.1.100.0050.00917.66
7.1.90.0040.00817.29
7.1.80.0070.01017.19
7.1.70.0090.00317.13
7.1.60.0080.00918.51
7.1.50.0080.00816.97
7.1.40.0110.00317.48
7.1.30.0110.00717.43
7.1.20.0070.00717.32
7.1.10.0040.01217.32
7.1.00.0070.04019.75
7.0.330.0000.00917.00
7.0.320.0070.00716.86
7.0.310.0090.00917.23
7.0.300.0000.01516.97
7.0.290.0090.00616.93
7.0.280.0030.01016.82
7.0.270.0090.00616.92
7.0.260.0040.00916.99
7.0.250.0070.00717.19
7.0.240.0030.00617.11
7.0.230.0000.01117.00
7.0.220.0070.00716.93
7.0.210.0030.01016.91
7.0.200.0030.00817.05
7.0.190.0030.00616.91
7.0.180.0060.00916.93
7.0.170.0070.00716.90
7.0.160.0070.00717.18
7.0.150.0070.00716.99
7.0.140.0060.03819.46
7.0.130.0060.00917.16
7.0.120.0030.01016.83
7.0.110.0100.00717.06
7.0.100.0120.03218.43
7.0.90.0080.03318.62
7.0.80.0080.02318.50
7.0.70.0060.02518.48
7.0.60.0070.02318.29
7.0.50.0150.01818.62
7.0.40.0020.02717.67
7.0.30.0030.02617.56
7.0.20.0050.02617.51
7.0.10.0050.02417.46
7.0.00.0070.05017.49
5.6.400.0110.00416.01
5.6.390.0080.00615.70
5.6.380.0090.00015.70
5.6.370.0030.01115.57
5.6.360.0080.00615.54
5.6.350.0070.01315.86
5.6.340.0030.00615.61
5.6.330.0080.00615.95
5.6.320.0090.00916.04
5.6.310.0100.00015.87
5.6.300.0040.01115.57
5.6.290.0050.00515.96
5.6.280.0080.03618.25
5.6.270.0060.00915.91
5.6.260.0060.01215.61
5.6.250.0040.02418.37
5.6.240.0050.02318.11
5.6.230.0070.02518.32
5.6.220.0060.02318.22
5.6.210.0110.01518.25
5.6.200.0060.02418.40
5.6.190.0120.02218.34
5.6.180.0050.02118.40
5.6.170.0070.02418.52
5.6.160.0080.02318.42
5.6.150.0090.04518.55
5.6.140.0020.03918.48
5.6.130.0050.04618.49
5.6.120.0050.04218.41
5.6.110.0090.04618.49
5.6.100.0050.02918.50
5.6.90.0080.03318.31
5.6.80.0050.04618.22
5.6.70.0070.02918.17
5.6.60.0030.03018.04
5.6.50.0100.03718.16
5.6.40.0090.03518.10
5.6.30.0040.04218.01
5.6.20.0070.04317.96
5.6.10.0110.02617.92
5.6.00.0100.04318.06
5.5.380.0030.02718.06
5.5.370.0050.02417.99
5.5.360.0050.02417.93
5.5.350.0030.03818.06
5.5.340.0020.03018.25
5.5.330.0030.02318.35
5.5.320.0050.02318.25
5.5.310.0060.02718.22
5.5.300.0040.02718.23
5.5.290.0070.03518.34
5.5.280.0120.02518.38
5.5.270.0050.04418.26
5.5.260.0070.04718.35
5.5.250.0130.02018.11
5.5.240.0070.02317.90
5.5.230.0040.02717.92
5.5.220.0050.03018.01
5.5.210.0040.02817.84
5.5.200.0120.04018.01
5.5.190.0090.04317.94
5.5.180.0100.04017.95
5.5.170.0030.01515.84
5.5.160.0130.03517.83
5.5.150.0070.02717.88
5.5.140.0110.04117.91
5.5.130.0080.04317.89
5.5.120.0090.04417.76
5.5.110.0100.04017.91
5.5.100.0100.04117.77
5.5.90.0030.04517.73
5.5.80.0080.04317.90
5.5.70.0120.04417.79
5.5.60.0090.04117.88
5.5.50.0170.03917.69
5.5.40.0120.04317.85
5.5.30.0150.04217.72
5.5.20.0160.04317.96
5.5.10.0110.04317.97
5.5.00.0130.04017.81
5.4.450.0030.04115.98
5.4.440.0080.02515.78
5.4.430.0090.04115.80
5.4.420.0080.04315.66
5.4.410.0050.04515.76
5.4.400.0070.03015.63
5.4.390.0090.03215.56
5.4.380.0070.04215.67
5.4.370.0030.03215.55
5.4.360.0060.04115.65
5.4.350.0080.02515.65
5.4.340.0100.03615.70
5.4.330.0110.00312.39
5.4.320.0070.03215.57
5.4.310.0070.04515.69
5.4.300.0080.04015.67
5.4.290.0030.04315.62
5.4.280.0080.03515.58
5.4.270.0050.04215.68
5.4.260.0080.04015.61
5.4.250.0050.04415.49
5.4.240.0140.03615.53
5.4.230.0040.04415.54
5.4.220.0080.04415.49
5.4.210.0050.04415.68
5.4.200.0090.04115.64
5.4.190.0050.03615.82
5.4.180.0120.02415.69
5.4.170.0090.04215.70
5.4.160.0020.04815.73
5.4.150.0030.04715.69
5.4.140.0040.04214.40
5.4.130.0050.03914.30
5.4.120.0110.03914.27
5.4.110.0120.02714.39
5.4.100.0050.04014.32
5.4.90.0100.02014.37
5.4.80.0050.03714.44
5.4.70.0080.03714.32
5.4.60.0070.03114.39
5.4.50.0050.03514.23
5.4.40.0030.02114.30
5.4.30.0070.03014.40
5.4.20.0030.02214.36
5.4.10.0080.02214.33
5.4.00.0040.02214.09
5.3.290.0080.03813.88
5.3.280.0080.04613.72
5.3.270.0080.04313.86
5.3.260.0020.03313.67
5.3.250.0100.04113.75
5.3.240.0060.04813.75
5.3.230.0100.03013.76
5.3.220.0050.03213.68
5.3.210.0090.04013.64
5.3.200.0030.02813.60
5.3.190.0150.03213.69
5.3.180.0100.04013.87
5.3.170.0080.04213.89
5.3.160.0070.03713.84
5.3.150.0070.03013.74
5.3.140.0040.02713.71
5.3.130.0080.04313.80
5.3.120.0080.04113.65
5.3.110.0070.03913.78
5.3.100.0040.04213.48
5.3.90.0050.03713.54
5.3.80.0050.03213.45
5.3.70.0030.03113.42
5.3.60.0080.04013.39
5.3.50.0050.03813.36
5.3.40.0100.01813.57
5.3.30.0050.04113.48
5.3.20.0030.04213.24
5.3.10.0070.03813.12
5.3.00.0070.02113.21
5.2.170.0030.03711.34
5.2.160.0030.03311.34
5.2.150.0030.04311.34
5.2.140.0030.06011.34
5.2.130.0030.03311.34
5.2.120.0030.06311.34
5.2.110.0100.05711.34
5.2.100.0000.06711.34
5.2.90.0000.06711.34
5.2.80.0030.03711.34
5.2.70.0030.04311.34
5.2.60.0030.06311.34
5.2.50.0000.05011.34
5.2.40.0070.03711.34
5.2.30.0070.05311.34
5.2.20.0070.02711.34
5.2.10.0030.05011.37
5.2.00.0100.06011.37
5.1.60.0100.04711.37
5.1.50.0070.05311.37
5.1.40.0000.05711.37
5.1.30.0030.05311.37
5.1.20.0070.03711.37
5.1.10.0130.01711.37
5.1.00.0030.05311.37
5.0.50.0100.04011.37
5.0.40.0030.04711.37
5.0.30.0070.04011.37
5.0.20.0100.02711.37
5.0.10.0030.02711.37
5.0.00.0000.07011.37
4.4.90.0000.01711.34
4.4.80.0030.03311.34
4.4.70.0030.03711.34
4.4.60.0000.03011.34
4.4.50.0000.03711.37
4.4.40.0000.05711.37
4.4.30.0070.03311.37
4.4.20.0000.02011.37
4.4.10.0070.01711.37
4.4.00.0100.04711.37
4.3.110.0070.02311.37
4.3.100.0070.03011.37
4.3.90.0030.03311.37
4.3.80.0100.04711.37
4.3.70.0030.03311.37
4.3.60.0030.02711.37
4.3.50.0000.03711.37
4.3.40.0070.01711.37
4.3.30.0100.02711.37
4.3.20.0000.03711.37
4.3.10.0070.03311.37
4.3.00.0000.03011.37

preferences:
39.19 ms | 400 KiB | 5 Q