3v4l.org

run code in 300+ PHP versions simultaneously
<?php function roundTime($time, $interval){ $seconds = $time; $rounded_seconds = round($seconds / ($interval * 60)) * ($interval * 60); return date('H:i', $rounded_seconds) . "\n"; } echo roundTime(strtotime("2023-05-30 14:40"), 15); echo PHP_EOL; echo roundTime(strtotime("2023-05-30 14:40"), 30);

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.5.30.0110.00719.36
8.5.20.0060.01020.13
8.5.10.0090.00921.41
8.5.00.0150.00620.03
8.4.180.0140.00819.54
8.4.170.0100.01023.82
8.4.160.0100.01223.85
8.4.150.0060.00716.87
8.4.140.0070.01317.83
8.4.130.0130.00717.71
8.4.120.0120.00822.39
8.4.110.0090.00818.59
8.4.100.0130.00917.73
8.4.90.0050.00518.05
8.4.80.0070.00218.03
8.4.70.0060.01017.90
8.4.60.0180.00418.01
8.4.50.0100.01118.79
8.4.40.0120.00817.59
8.4.30.0130.00620.59
8.4.20.0130.00719.57
8.4.10.0080.00019.68
8.3.300.0120.00920.80
8.3.290.0110.00820.95
8.3.280.0100.01018.55
8.3.270.0140.00616.63
8.3.260.0110.00916.97
8.3.250.0130.00518.81
8.3.240.0090.01016.72
8.3.230.0150.00516.66
8.3.220.0090.00717.08
8.3.210.0040.00316.79
8.3.200.0090.00816.56
8.3.190.0120.00617.25
8.3.180.0070.01218.66
8.3.170.0110.00418.89
8.3.160.0150.00416.78
8.3.150.0070.01116.84
8.3.140.0080.00018.52
8.3.130.0130.00318.37
8.3.120.0090.00620.75
8.3.110.0350.00816.26
8.3.100.0330.01516.31
8.3.90.0420.00616.38
8.3.80.0400.01016.38
8.3.70.0410.00916.47
8.3.60.0420.00716.63
8.3.50.0460.00816.25
8.3.40.0420.00317.38
8.3.30.0240.01017.25
8.3.20.0180.00317.50
8.3.10.0150.00317.34
8.3.00.0050.00517.75
8.2.300.0130.00818.36
8.2.290.0100.00820.57
8.2.280.0030.00916.80
8.2.270.0070.01116.85
8.2.260.0060.00316.79
8.2.250.0040.00416.63
8.2.240.0080.00017.40
8.2.230.0180.00016.43
8.2.220.0110.00716.81
8.2.210.0210.00416.66
8.2.200.0170.00316.88
8.2.190.0160.00416.38
8.2.180.0160.00316.62
8.2.170.0260.00917.63
8.2.160.0240.00417.75
8.2.150.0210.00017.60
8.2.140.0290.00317.50
8.2.130.0280.01617.75
8.2.120.0250.01117.25
8.2.110.0290.01117.38
8.2.100.0340.00717.49
8.2.90.0300.01317.25
8.2.80.0340.00917.72
8.2.70.0440.00617.50
8.2.60.0440.00617.50
8.2.50.0300.01317.63
8.2.40.0370.00417.50
8.2.30.0400.00017.50
8.2.20.0340.00617.50
8.2.10.0370.00317.24
8.2.00.0290.00817.50
8.1.340.0130.00619.86
8.1.330.0120.00816.61
8.1.320.0100.00915.91
8.1.310.0120.00617.87
8.1.300.0090.00017.93
8.1.290.0330.00915.88
8.1.280.0340.00816.12
8.1.270.0290.00917.48
8.1.260.0290.01917.25
8.1.250.0330.00317.63
8.1.240.0290.01117.25
8.1.230.0300.01017.60
8.1.220.0310.00317.63
8.1.210.0330.00317.50
8.1.200.0360.00717.11
8.1.190.0430.00017.36
8.1.180.0370.00617.22
8.1.170.0260.01017.47
8.1.160.0200.01217.23
8.1.150.0220.01817.38
8.1.140.0270.01117.38
8.1.130.0300.00917.50
8.1.120.0240.01417.23
8.1.110.0310.00817.38
8.1.100.0240.01217.50
8.1.90.0280.00617.63
8.1.80.0180.00017.47
8.1.70.0390.00617.46
8.1.60.0310.01017.50
8.1.50.0310.00717.48
8.1.40.0360.00617.36
8.1.30.0330.01017.50
8.1.20.0290.01917.50
8.1.10.0220.00617.47
8.1.00.0360.00317.50

preferences:
42.96 ms | 980 KiB | 5 Q