3v4l.org

run code in 300+ PHP versions simultaneously
<?php $date = new DateTime('12:07 UTC'); $seconds = (int) $date->format('i'); $rounded = round($seconds / 5) * 5; var_dump($date->format('H:i:s')); var_dump($seconds); var_dump($rounded); $date->setTime($date->format('H'), $rounded, $date->format('s')); var_dump($date->format('H:i:s'));

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.70.0000.01516.58
8.3.60.0070.00718.55
8.3.50.0040.01118.43
8.3.40.0070.00718.83
8.3.30.0120.00418.94
8.3.20.0050.00320.91
8.3.10.0040.00420.46
8.3.00.0040.00420.64
8.2.190.0120.00618.29
8.2.180.0080.00825.92
8.2.170.0110.00718.78
8.2.160.0100.00322.12
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0050.00326.16
8.2.120.0050.00319.77
8.2.110.0060.00321.12
8.2.100.0080.00417.84
8.2.90.0000.00818.01
8.2.80.0040.00419.66
8.2.70.0030.00517.93
8.2.60.0090.00018.16
8.2.50.0000.00818.10
8.2.40.0000.00819.47
8.2.30.0040.00419.19
8.2.20.0040.00418.13
8.2.10.0050.00318.97
8.2.00.0040.00419.38
8.1.280.0090.00625.92
8.1.270.0000.00820.74
8.1.260.0060.00326.35
8.1.250.0040.00428.09
8.1.240.0060.00322.21
8.1.230.0110.00022.75
8.1.220.0030.00517.79
8.1.210.0000.00820.32
8.1.200.0060.00317.34
8.1.190.0060.00317.35
8.1.180.0030.00518.10
8.1.170.0030.00618.70
8.1.160.0000.00819.04
8.1.150.0060.00318.90
8.1.140.0020.00520.71
8.1.130.0030.00520.14
8.1.120.0070.00017.48
8.1.110.0030.00517.46
8.1.100.0070.00017.47
8.1.90.0070.00017.67
8.1.80.0090.00017.53
8.1.70.0070.00017.64
8.1.60.0040.00417.72
8.1.50.0080.00417.54
8.1.40.0040.00817.53
8.1.30.0000.00817.79
8.1.20.0040.00417.81
8.1.10.0000.00817.61
8.1.00.0000.00717.57
8.0.300.0000.00722.03
8.0.290.0060.00316.88
8.0.280.0000.00718.55
8.0.270.0000.00717.01
8.0.260.0030.00320.13
8.0.250.0000.00717.14
8.0.240.0000.00817.13
8.0.230.0000.00717.14
8.0.220.0030.00317.06
8.0.210.0030.00317.01
8.0.200.0030.00317.11
8.0.190.0050.00316.95
8.0.180.0040.00416.96
8.0.170.0040.00416.90
8.0.160.0000.00816.93
8.0.150.0030.00316.94
8.0.140.0030.00316.97
8.0.130.0060.00013.49
8.0.120.0040.00416.89
8.0.110.0040.00317.00
8.0.100.0000.00716.91
8.0.90.0030.00616.91
8.0.80.0060.01017.04
8.0.70.0030.00516.97
8.0.60.0030.00317.00
8.0.50.0000.00716.80
8.0.30.0070.01117.16
8.0.20.0060.01217.14
8.0.10.0040.00417.21
8.0.00.0120.00816.80
7.4.330.0000.00515.55
7.4.320.0000.00716.72
7.4.300.0060.00016.53
7.4.290.0030.00616.72
7.4.280.0070.00316.52
7.4.270.0040.00316.73
7.4.260.0050.00013.41
7.4.250.0000.00816.70
7.4.240.0060.00216.63
7.4.230.0050.00316.58
7.4.220.0060.00216.78
7.4.210.0040.01116.57
7.4.200.0070.00016.70
7.4.130.0000.01716.71
7.4.120.0100.01016.79
7.4.110.0130.01016.68
7.4.100.0070.01016.73
7.4.90.0140.00516.43
7.4.80.0070.01019.39
7.4.70.0110.00716.75
7.4.60.0100.01316.60
7.4.50.0040.00716.53
7.4.40.0060.00916.84
7.4.00.0080.01015.01
7.3.330.0030.00316.45
7.3.320.0000.00513.35
7.3.310.0000.00716.34
7.3.300.0040.00416.48
7.3.290.0060.00916.49
7.3.280.0110.00416.38
7.3.260.0070.01116.90
7.3.240.0070.01216.55
7.3.230.0080.00816.39
7.3.210.0100.00716.69
7.3.200.0120.00316.39
7.3.190.0000.01516.63
7.3.180.0060.00916.82
7.3.170.0130.00616.70
7.3.160.0060.01016.63
7.3.120.0080.01014.75
7.3.110.0090.00614.97
7.3.100.0060.00914.94
7.3.90.0080.00515.02
7.3.80.0060.00814.83
7.3.70.0060.00814.90
7.3.60.0050.00814.86
7.3.50.0070.00614.95
7.3.40.0000.01514.89
7.3.30.0060.00814.71
7.3.20.0100.00715.79
7.3.10.0080.00815.84
7.3.00.0070.00815.66
7.2.330.0090.00916.81
7.2.320.0070.01316.74
7.2.310.0080.00916.88
7.2.300.0120.00916.86
7.2.290.0060.01116.77
7.2.250.0080.01115.09
7.2.240.0080.00915.07
7.2.230.0090.00614.81
7.2.220.0120.00315.28
7.2.210.0080.00715.01
7.2.200.0020.01415.07
7.2.190.0060.00614.92
7.2.180.0080.01015.02
7.2.170.0090.00615.06
7.1.330.0090.00514.81
7.1.320.0040.01114.89
7.1.310.0060.00914.72
7.1.300.0070.00715.01
7.1.290.0090.00514.80
7.1.280.0060.01114.85
7.1.270.0080.00714.87
7.1.260.0070.00814.84

preferences:
29.25 ms | 401 KiB | 5 Q