3v4l.org

run code in 300+ PHP versions simultaneously
<?php // vychozi pripocet je cela ctvrthodina $diff = 15; $minutes = date('i'); $minutes = (strlen($minutes) == 2) ? (int) $minutes[1] : (int) $minutes; // najdi nejblizsi celou ctvrthodinu $quarters = array(15, 30, 45, 60); foreach($quarters as $quarter){ $curDiff = $quarter - $minutes; // pokud je interval mensi nez minuly a zaroven kladny // presne 0 je na dane ctvrthodine a to chceme pripocist plnych 15 min if($curDiff < $diff && $curDiff > 0){ $diff = $curDiff; } } $dt = new DateTime; $dt->add(new DateInterval('PT'.$diff.'M')); echo $dt->format('Y-m-d H:i:00'); echo '<br>'.date('H:i');

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)
8.3.60.0150.00018.30
8.3.50.0130.00517.57
8.3.40.0070.00719.10
8.3.30.0120.00318.77
8.3.20.0150.00018.73
8.3.10.0090.00920.73
8.3.00.0110.00317.63
8.2.180.0140.00716.88
8.2.170.0140.00322.96
8.2.160.0100.00322.25
8.2.150.0030.00524.18
8.2.140.0030.00624.66
8.2.130.0040.00426.16
8.2.120.0070.00019.95
8.2.110.0070.00321.04
8.2.100.0080.00418.03
8.2.90.0030.00619.30
8.2.80.0030.00618.05
8.2.70.0030.00517.63
8.2.60.0040.00417.93
8.2.50.0050.00318.07
8.2.40.0040.00419.94
8.2.30.0040.00418.14
8.2.20.0030.00517.89
8.2.10.0090.00017.82
8.2.00.0030.00718.00
8.1.280.0130.00625.92
8.1.270.0050.00224.66
8.1.260.0000.00726.35
8.1.250.0040.00428.09
8.1.240.0050.00521.01
8.1.230.0070.00420.89
8.1.220.0030.00717.74
8.1.210.0030.00518.93
8.1.200.0030.00717.48
8.1.190.0060.00317.66
8.1.180.0040.00418.10
8.1.170.0030.00620.57
8.1.160.0070.00019.07
8.1.150.0040.00418.84
8.1.140.0040.00417.64
8.1.130.0000.00717.85
8.1.120.0080.00017.62
8.1.110.0040.00417.68
8.1.100.0030.00417.64
8.1.90.0030.00317.52
8.1.80.0000.00717.49
8.1.70.0030.00317.54
8.1.60.0000.00817.80
8.1.50.0030.00617.52
8.1.40.0000.00817.56
8.1.30.0030.00617.76
8.1.20.0000.00917.85
8.1.10.0050.00317.67
8.1.00.0040.00417.63
8.0.300.0040.00419.85
8.0.290.0040.00416.86
8.0.280.0030.00318.43
8.0.270.0000.00717.38
8.0.260.0030.00316.93
8.0.250.0050.00217.20
8.0.240.0100.00017.05
8.0.230.0040.00417.19
8.0.220.0070.00017.09
8.0.210.0030.00617.12
8.0.200.0000.00817.17
8.0.190.0040.00417.15
8.0.180.0040.00417.15
8.0.170.0030.00617.14
8.0.160.0000.00717.09
8.0.150.0060.00317.04
8.0.140.0000.00717.06
8.0.130.0040.00413.52
8.0.120.0000.00817.09
8.0.110.0000.00817.16
8.0.100.0000.00716.91
8.0.90.0040.00416.97
8.0.80.0100.01017.11
8.0.70.0070.00017.09
8.0.60.0070.00017.16
8.0.50.0040.00417.16
8.0.30.0080.01117.30
8.0.20.0100.00817.37
8.0.10.0030.00517.10
8.0.00.0100.00716.94
7.4.330.0000.00513.11
7.4.320.0060.00016.55
7.4.300.0030.00316.64
7.4.290.0040.00416.75
7.4.280.0030.00716.75
7.4.270.0050.00216.76
7.4.260.0060.00013.39
7.4.250.0040.00416.72
7.4.240.0030.00316.66
7.4.230.0000.00716.55
7.4.220.0100.00616.84
7.4.210.0140.00616.75
7.4.200.0040.00416.39
7.4.190.0030.00316.69
7.4.160.0080.00816.54
7.4.150.0090.00916.69
7.4.140.0140.00616.71
7.4.130.0100.00616.71
7.4.120.0090.00816.76
7.4.110.0170.00316.68
7.4.100.0100.00716.75
7.4.90.0060.01216.76
7.4.80.0150.00316.67
7.4.70.0130.00416.75
7.4.60.0070.01016.88
7.4.50.0030.00316.71
7.4.40.0070.00716.73
7.4.30.0060.01016.91
7.4.00.0120.00315.14
7.3.330.0060.00013.36
7.3.320.0060.00013.19
7.3.310.0030.00616.45
7.3.300.0070.00016.48
7.3.290.0040.01616.50
7.3.280.0110.00516.47
7.3.270.0140.00316.63
7.3.260.0130.00816.65
7.3.250.0100.01016.57
7.3.240.0070.01016.69
7.3.230.0030.01316.74
7.3.210.0110.00716.39
7.3.200.0050.01919.39
7.3.190.0090.00916.45
7.3.180.0150.00016.53
7.3.170.0060.01616.69
7.3.160.0090.00916.57
7.3.120.0040.01515.28
7.3.110.0120.00415.04
7.3.100.0100.00315.08
7.3.90.0110.00414.73
7.3.80.0080.00515.12
7.3.70.0030.00915.18
7.3.60.0030.01015.06
7.3.50.0110.00414.75
7.3.40.0090.00315.17
7.3.30.0070.00414.94
7.3.20.0030.01016.88
7.3.10.0060.00616.86
7.3.00.0060.00616.96
7.2.330.0030.01516.58
7.2.320.0070.01017.04
7.2.310.0170.00716.94
7.2.300.0070.01316.91
7.2.290.0070.01016.79
7.2.240.0060.01015.10
7.2.230.0060.00815.09
7.2.220.0000.01915.33
7.2.210.0080.00315.24
7.2.200.0070.01015.45
7.2.190.0030.01315.27
7.2.180.0100.00715.43
7.2.170.0000.01115.25
7.2.160.0060.00915.38
7.2.150.0070.00717.05
7.2.140.0090.00617.05
7.2.130.0000.01017.22
7.2.120.0120.00317.09
7.2.110.0060.00917.05
7.2.100.0070.01016.84
7.2.90.0000.01517.17
7.2.80.0100.00317.24
7.2.70.0030.00717.09
7.2.60.0070.00717.14
7.2.50.0000.01217.04
7.2.40.0030.01017.27
7.2.30.0060.00916.91
7.2.20.0090.00917.01
7.2.10.0030.00616.92
7.2.00.0100.00317.13
7.1.330.0070.00715.75
7.1.320.0090.00616.16
7.1.310.0070.00716.25
7.1.300.0060.00615.93
7.1.290.0000.01116.05
7.1.280.0030.00716.00
7.1.270.0090.00615.86
7.1.260.0030.01015.93
7.1.250.0000.01315.96
7.1.70.0000.00817.51
7.1.60.0140.01119.40
7.1.50.0080.01517.29
7.1.00.0070.06722.36
7.0.200.0060.00317.06
7.0.140.0000.07722.00
7.0.120.0030.07022.13
7.0.110.0030.07319.99
7.0.100.0370.03719.96
7.0.90.0370.08019.97
7.0.80.0430.05720.03
7.0.70.0400.07319.88
7.0.60.0600.07320.08
7.0.50.0630.08019.96
7.0.40.0030.06719.82
7.0.30.0100.06319.70
7.0.20.0030.05019.73
7.0.10.0030.04319.64
7.0.00.0070.08319.71
5.6.280.0070.07021.07
5.6.260.0000.04320.59
5.6.250.0100.07320.58
5.6.240.0100.07020.70
5.6.230.0070.08320.68
5.6.220.0130.07020.68
5.6.210.0030.08720.63
5.6.200.0100.08320.56
5.6.190.0100.04320.55
5.6.180.0100.03720.82
5.6.170.0070.07320.64
5.6.160.0130.04720.71
5.6.150.0030.09020.71
5.6.140.0030.09020.65
5.6.130.0170.06720.85
5.6.120.0100.07320.64
5.6.110.0030.05020.64
5.6.100.0030.08020.66
5.6.90.0070.06320.53
5.6.80.0030.08020.09
5.6.70.0170.06320.02
5.6.60.0030.06319.92
5.6.50.0070.08019.94
5.6.40.0070.04719.99
5.6.30.0100.06719.94
5.6.20.0070.08019.97
5.6.10.0130.05319.97
5.6.00.0070.07319.98
5.5.380.0000.07017.40
5.5.370.0030.08317.56
5.5.360.0070.07017.51
5.5.350.0030.07717.66
5.5.340.0030.06018.02
5.5.330.0030.07718.17
5.5.320.0030.06318.13
5.5.310.0100.07018.16
5.5.300.0100.06718.02
5.5.290.0170.07317.85
5.5.280.0170.06018.16
5.5.270.0130.07718.15
5.5.260.0070.08318.09
5.5.250.0070.06717.84
5.5.240.0170.03317.48
5.5.230.0000.05017.27
5.5.220.0070.07317.47
5.5.210.0070.05717.50
5.5.200.0030.04317.24
5.5.190.0100.05717.34
5.5.180.0000.07717.48
5.5.160.0200.06017.50
5.5.150.0000.04017.21
5.5.140.0030.03717.47
5.5.130.0100.03317.47
5.5.120.0100.06317.24
5.5.110.0030.04317.11
5.5.100.0030.04317.42
5.5.90.0000.04017.09
5.5.80.0030.04017.38
5.5.70.0070.03317.15
5.5.60.0000.03717.37
5.5.50.0000.04017.26
5.5.40.0030.08017.11
5.5.30.0100.04017.13
5.5.20.0030.03717.09
5.5.10.0000.04017.34
5.5.00.0070.03317.07
5.4.450.0100.05019.27
5.4.440.0100.07019.43
5.4.430.0100.07719.43
5.4.420.0000.08719.59
5.4.410.0130.07019.20
5.4.400.0030.04719.00
5.4.390.0030.06719.03
5.4.380.0030.06019.12
5.4.370.0070.07319.11
5.4.360.0030.05019.08
5.4.350.0130.06718.95
5.4.340.0100.07019.18
5.4.320.0030.04719.27
5.4.310.0030.05719.20
5.4.300.0100.05018.96
5.4.290.0000.03719.25
5.4.280.0070.03319.00
5.4.270.0030.03718.95
5.4.260.0100.03019.16
5.4.250.0070.03719.11
5.4.240.0070.03318.95
5.4.230.0000.04019.17
5.4.220.0000.05019.02
5.4.210.0070.03018.98
5.4.200.0070.03018.99
5.4.190.0000.07719.26
5.4.180.0000.04719.03
5.4.170.0000.04018.94
5.4.160.0030.03718.98
5.4.150.0000.03319.01
5.4.140.0030.03716.28
5.4.130.0070.03316.28
5.4.120.0000.04016.25
5.4.110.0030.03316.43
5.4.100.0030.03016.58
5.4.90.0030.03016.54
5.4.80.0030.03316.58
5.4.70.0000.06016.16
5.4.60.0000.06716.21
5.4.50.0200.05716.48
5.4.40.0000.05316.39
5.4.30.0000.05716.25
5.4.20.0030.04316.25
5.4.10.0030.03716.40
5.4.00.0030.06315.66
5.3.290.0000.05714.57
5.3.280.0000.06014.46
5.3.270.0030.03714.69
5.3.260.0030.04014.54
5.3.250.0000.04014.43
5.3.240.0030.04014.43
5.3.230.0030.03714.49
5.3.220.0000.04314.50
5.3.210.0070.04014.41
5.3.200.0070.03314.39
5.3.190.0000.04014.49
5.3.180.0030.03314.39
5.3.170.0030.03014.41
5.3.160.0100.07014.45
5.3.150.0070.04014.35
5.3.140.0000.04014.44
5.3.130.0030.03314.39
5.3.120.0100.04014.55
5.3.110.0130.04014.62
5.3.100.0030.03313.89
5.3.90.0030.04014.08
5.3.80.0070.05314.09
5.3.70.0170.02014.09
5.3.60.0070.04713.84
5.3.50.0030.06313.92
5.3.40.0070.07713.80
5.3.30.0000.06313.83
5.3.20.0070.05713.55
5.3.10.0070.05713.54
5.3.00.0100.06013.70
5.2.170.0030.04312.02
5.2.160.0030.04712.02
5.2.150.0070.05712.02
5.2.140.0030.05712.02
5.2.130.0000.04012.02
5.2.120.0000.03712.02
5.2.110.0000.06012.02
5.2.100.0000.04012.02
5.2.90.0130.05312.02
5.2.80.0030.03712.02
5.2.70.0070.05312.02
5.2.60.0070.03312.02
5.2.50.0070.04312.02
5.2.40.0070.04012.02
5.2.30.0070.05712.02
5.2.20.0030.05012.02
5.2.10.0000.03012.02
5.2.00.0070.03312.02
5.1.60.0000.03012.02
5.1.50.0070.04312.02
5.1.40.0000.03312.02
5.1.30.0000.03712.02
5.1.20.0070.05012.02
5.1.10.0070.05312.02
5.1.00.0000.04712.02
5.0.50.0000.04712.02
5.0.40.0030.01712.02
5.0.30.0000.06012.02
5.0.20.0030.02012.02
5.0.10.0030.01712.02
5.0.00.0030.06012.02
4.4.90.0030.03312.02
4.4.80.0030.03312.02
4.4.70.0030.03312.02
4.4.60.0000.03012.02
4.4.50.0030.03312.02
4.4.40.0100.04712.02
4.4.30.0000.03012.02
4.4.20.0030.03312.02
4.4.10.0000.03712.02
4.4.00.0000.03012.02
4.3.110.0070.02312.02
4.3.100.0030.03312.02
4.3.90.0000.03312.02
4.3.80.0000.02712.02
4.3.70.0000.02312.02
4.3.60.0000.03312.02
4.3.50.0000.02312.02
4.3.40.0000.05012.02
4.3.30.0000.01712.02
4.3.20.0000.03712.02
4.3.10.0030.03012.02
4.3.00.0030.03712.02

preferences:
48.84 ms | 401 KiB | 5 Q