3v4l.org

run code in 300+ PHP versions simultaneously
<?php // vychozi pripocet je cela ctvrthodina $diff = 15; $dt = new DateTime; $minutes = $dt->format('i'); $minutes = (strlen($minutes) == 1) ? (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->add(new DateInterval('PT'.$diff.'M')); echo $dt->format('Y-m-d H:i:00').PHP_EOL; echo 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.0040.01118.41
8.3.50.0120.01022.05
8.3.40.0150.00018.71
8.3.30.0090.00618.83
8.3.20.0080.00018.58
8.3.10.0080.00021.10
8.3.00.0040.00421.77
8.2.180.0070.00716.75
8.2.170.0150.00622.96
8.2.160.0090.00620.44
8.2.150.0000.00824.18
8.2.140.0000.00824.66
8.2.130.0070.00026.16
8.2.120.0080.00021.13
8.2.110.0030.00720.94
8.2.100.0040.00817.84
8.2.90.0070.00419.17
8.2.80.0000.00817.97
8.2.70.0050.01117.38
8.2.60.0030.00618.05
8.2.50.0050.00318.10
8.2.40.0000.00718.22
8.2.30.0000.00819.33
8.2.20.0040.00417.81
8.2.10.0080.00017.82
8.2.00.0000.00717.93
8.1.280.0110.01525.92
8.1.270.0040.00423.99
8.1.260.0100.00326.35
8.1.250.0080.00028.09
8.1.240.0070.00319.51
8.1.230.0060.00617.70
8.1.220.0000.00817.88
8.1.210.0080.00018.77
8.1.200.0030.00617.35
8.1.190.0080.00017.48
8.1.180.0000.00918.10
8.1.170.0040.00418.71
8.1.160.0060.00319.01
8.1.150.0030.00518.71
8.1.140.0030.00517.72
8.1.130.0000.00717.93
8.1.120.0070.00017.57
8.1.110.0040.00417.61
8.1.100.0040.00417.57
8.1.90.0000.00817.67
8.1.80.0040.00417.66
8.1.70.0040.00417.58
8.1.60.0090.00017.65
8.1.50.0040.00417.61
8.1.40.0080.00017.55
8.1.30.0080.00017.73
8.1.20.0050.00317.70
8.1.10.0040.00417.67
8.1.00.0050.00517.57
8.0.300.0040.00418.77
8.0.290.0040.00416.88
8.0.280.0000.00718.40
8.0.270.0040.00417.25
8.0.260.0080.00017.02
8.0.250.0080.00017.05
8.0.240.0030.00517.07
8.0.230.0030.00317.18
8.0.220.0030.00317.08
8.0.210.0000.00717.03
8.0.200.0030.00317.17
8.0.190.0040.00417.15
8.0.180.0000.00817.02
8.0.170.0000.00817.04
8.0.160.0040.00417.08
8.0.150.0000.00817.02
8.0.140.0050.00217.09
8.0.130.0000.00613.48
8.0.120.0000.00816.97
8.0.110.0000.00716.96
8.0.100.0040.00417.13
8.0.90.0000.00716.96
8.0.80.0040.01117.01
8.0.70.0040.00416.97
8.0.60.0040.00417.16
8.0.50.0050.00217.00
8.0.30.0080.01117.22
8.0.20.0120.00817.51
8.0.10.0040.00417.11
8.0.00.0060.01417.05
7.4.330.0050.00016.80
7.4.320.0070.00016.75
7.4.300.0060.00016.73
7.4.290.0030.00316.63
7.4.280.0000.00816.65
7.4.270.0030.00316.66
7.4.260.0050.00013.28
7.4.250.0000.00816.59
7.4.240.0030.00316.75
7.4.230.0000.00816.73
7.4.220.0090.00616.67
7.4.210.0070.00916.78
7.4.200.0000.00716.79
7.4.190.0030.00316.46
7.4.160.0080.00816.75
7.4.150.0030.01517.40
7.4.140.0110.00617.86
7.4.130.0080.00916.63
7.4.120.0090.00816.67
7.4.110.0120.00616.61
7.4.100.0070.01416.83
7.4.90.0090.00916.82
7.4.80.0070.01019.39
7.4.70.0060.01016.75
7.4.60.0130.00716.56
7.4.50.0000.00816.55
7.4.40.0060.00622.77
7.4.30.0100.00716.71
7.4.00.0080.01015.13
7.3.330.0000.00613.18
7.3.320.0000.00513.19
7.3.310.0030.00316.52
7.3.300.0000.00716.51
7.3.290.0110.00516.50
7.3.280.0120.00616.48
7.3.270.0090.00917.40
7.3.260.0150.00518.24
7.3.250.0070.01016.57
7.3.240.0100.01016.56
7.3.230.0090.00916.52
7.3.210.0110.00516.47
7.3.200.0070.01419.39
7.3.190.0130.00316.74
7.3.180.0160.00016.63
7.3.170.0140.00616.57
7.3.160.0040.01116.70
7.3.120.0100.00515.07
7.3.110.0090.00915.09
7.3.100.0030.01315.07
7.3.90.0050.01314.94
7.3.80.0030.00715.01
7.3.70.0040.00715.12
7.3.60.0090.00515.13
7.3.50.0060.00715.01
7.3.40.0100.00514.96
7.3.30.0040.00815.02
7.3.20.0080.00316.72
7.3.10.0020.01216.87
7.3.00.0030.00916.64
7.2.330.0070.01116.69
7.2.320.0060.01216.83
7.2.310.0140.01116.70
7.2.300.0060.01316.70
7.2.290.0150.00616.92
7.2.250.0070.01115.41
7.2.240.0080.01215.16
7.2.230.0000.01715.34
7.2.220.0040.00715.25
7.2.210.0040.00915.41
7.2.200.0110.00415.21
7.2.190.0020.01315.05
7.2.180.0070.00815.24
7.2.170.0030.00915.15
7.2.60.0090.00617.01
7.2.00.0040.00819.77
7.1.330.0060.00816.03
7.1.320.0060.00416.10
7.1.310.0020.00915.96
7.1.300.0040.00915.99
7.1.290.0060.00916.03
7.1.280.0080.00616.04
7.1.270.0020.01015.96
7.1.260.0070.00915.98
7.1.200.0060.00615.87
7.1.100.0030.01318.39
7.1.70.0050.00517.20
7.1.60.0060.01819.17
7.1.50.0060.01617.09
7.1.00.0030.03322.46
7.0.200.0130.00314.69
7.0.140.0030.07322.14
7.0.90.0070.08320.02
7.0.80.0100.08019.93
7.0.70.0100.07719.93
7.0.60.0130.06719.98
7.0.50.0130.04720.37
7.0.40.0130.07320.00
7.0.30.0070.05019.95
7.0.20.0070.08020.13
7.0.10.0070.08320.04
7.0.00.0100.03720.16
5.6.280.0100.06721.01
5.6.240.0070.07320.68
5.6.230.0100.08320.52
5.6.220.0170.07320.48
5.6.210.0070.05320.55
5.6.200.0170.07321.04
5.6.190.0070.04021.04
5.6.180.0070.06021.18
5.6.170.0130.07721.02
5.6.160.0170.02721.07
5.6.150.0070.05321.10
5.6.140.0170.05721.07
5.6.130.0130.07321.07
5.6.120.0100.07721.11
5.6.110.0030.08721.12
5.6.100.0000.04721.03
5.6.90.0070.05321.04
5.6.80.0170.06720.37
5.6.70.0070.03720.45
5.6.60.0130.07020.46
5.6.50.0070.04320.41
5.6.40.0030.05020.36
5.6.30.0070.05720.29
5.6.20.0130.05020.46
5.6.10.0070.08020.42
5.6.00.0100.05320.41
5.5.380.0130.07720.44
5.5.370.0130.04020.56
5.5.360.0170.07320.45
5.5.350.0100.07720.33
5.5.340.0100.09020.78
5.5.330.0200.06720.80
5.5.320.0100.07720.91
5.5.310.0030.04020.92
5.5.300.0100.08320.86
5.5.290.0030.07720.79
5.5.280.0000.08320.84
5.5.270.0100.07720.82
5.5.260.0030.04320.75
5.5.250.0170.07320.69
5.5.240.0070.05720.16
5.5.230.0030.08020.26
5.5.220.0100.03720.29
5.5.210.0000.05320.28
5.5.200.0030.04720.07
5.5.190.0200.05320.26
5.5.180.0030.05320.18
5.5.160.0170.06720.21
5.5.150.0070.08020.25
5.5.140.0130.07020.23
5.5.130.0000.08020.14
5.5.120.0030.04720.14
5.5.110.0130.07320.23
5.5.100.0100.07720.15
5.5.90.0070.08020.09
5.5.80.0030.04319.95
5.5.70.0130.04720.04
5.5.60.0100.06719.93
5.5.50.0130.07020.11
5.5.40.0070.07720.09
5.5.30.0130.02720.04
5.5.20.0170.06320.14
5.5.10.0100.05019.96
5.5.00.0100.04020.01
5.4.450.0030.04019.14
5.4.440.0030.05019.50
5.4.430.0130.07019.21
5.4.420.0030.08319.44
5.4.410.0100.07019.42
5.4.400.0070.08019.09
5.4.390.0030.08019.11
5.4.380.0030.06319.22
5.4.370.0100.07018.97
5.4.360.0100.04019.07
5.4.350.0000.04318.94
5.4.340.0100.03319.10
5.4.320.0130.07018.94
5.4.310.0170.06719.02
5.4.300.0100.04718.97
5.4.290.0070.04318.94
5.4.280.0070.04319.03
5.4.270.0030.08019.09
5.4.260.0070.04318.81
5.4.250.0070.04319.14
5.4.240.0100.06018.91
5.4.230.0100.07019.11
5.4.220.0070.04319.14
5.4.210.0100.04719.02
5.4.200.0070.07319.05
5.4.190.0130.07318.80
5.4.180.0130.07018.80
5.4.170.0100.06019.11
5.4.160.0070.08018.79
5.4.150.0070.07718.76
5.4.140.0100.07016.34
5.4.130.0070.06016.38
5.4.120.0030.06716.32
5.4.110.0100.06716.26
5.4.100.0100.07016.32
5.4.90.0070.05016.34
5.4.80.0100.02716.31
5.4.70.0070.03016.44
5.4.60.0030.07016.31
5.4.50.0030.07016.36
5.4.40.0000.05016.39
5.4.30.0070.03316.32
5.4.20.0130.06316.41
5.4.10.0200.05716.18
5.4.00.0200.06015.77
5.3.290.0070.04314.52
5.3.280.0030.05714.60
5.3.270.0100.07314.54
5.3.260.0070.04014.61
5.3.250.0100.06714.59
5.3.240.0030.08014.57
5.3.230.0070.07314.56
5.3.220.0070.04014.55
5.3.210.0170.04714.42
5.3.200.0030.07314.54
5.3.190.0030.04314.42
5.3.180.0130.06014.42
5.3.170.0000.03714.55
5.3.160.0100.06314.50
5.3.150.0100.05714.50
5.3.140.0130.06714.42
5.3.130.0000.06714.55
5.3.120.0000.05014.45
5.3.110.0030.06714.38
5.3.100.0000.08313.89
5.3.90.0100.06714.02
5.3.80.0030.07713.79
5.3.70.0100.07313.99
5.3.60.0130.06013.79
5.3.50.0000.04713.88
5.3.40.0100.07013.93
5.3.30.0030.05313.90
5.3.20.0030.04313.56
5.3.10.0130.06713.61
5.3.00.0130.06713.63
5.2.170.0070.06311.06
5.2.160.0100.05011.09
5.2.150.0030.06311.18
5.2.140.0070.06311.21
5.2.130.0100.05711.12
5.2.120.0070.05310.95
5.2.110.0000.03311.09
5.2.100.0130.02311.13
5.2.90.0070.04310.95
5.2.80.0070.06011.04
5.2.70.0030.04310.94
5.2.60.0000.06010.96
5.2.50.0070.03311.01
5.2.40.0070.05010.99
5.2.30.0030.05010.95
5.2.20.0070.06010.91
5.2.10.0070.06710.88
5.2.00.0170.04010.79
5.1.60.0000.02310.36
5.1.50.0000.03010.36
5.1.40.0030.05010.36
5.1.30.0030.06010.41
5.1.20.0000.06310.42
5.1.10.0030.04710.36
5.1.00.0030.05310.36
5.0.50.0000.02310.36
5.0.40.0070.04710.36
5.0.30.0000.06710.36
5.0.20.0000.03310.36
5.0.10.0070.03710.36
5.0.00.0000.05310.36
4.4.90.0030.04010.36
4.4.80.0030.02310.36
4.4.70.0000.02010.36
4.4.60.0030.02710.36
4.4.50.0000.03310.36
4.4.40.0000.05310.36
4.4.30.0000.03710.36
4.4.20.0030.03710.36
4.4.10.0000.02710.36
4.4.00.0070.05010.36
4.3.110.0000.02010.36
4.3.100.0000.03710.36
4.3.90.0070.03010.36
4.3.80.0070.05310.36
4.3.70.0030.03310.36
4.3.60.0000.03310.36
4.3.50.0070.03010.36
4.3.40.0000.04010.36
4.3.30.0000.03010.36
4.3.20.0000.03310.36
4.3.10.0000.03710.36
4.3.00.0030.03010.36

preferences:
44.08 ms | 401 KiB | 5 Q