3v4l.org

run code in 300+ PHP versions simultaneously
<?php function secondsToString($seconds) { $units = ['day' => 86400, 'hour' => 3600, 'minute' => 60, 'second' => 1]; $parts = []; foreach ($units as $name => $duration) { $div = floor($seconds / $duration); if ($div == 0) { continue; } $parts[] = $div == 1 ? "{$div} {$name}" : "{$div} {$name}s"; $seconds %= $duration; } $last = array_pop($parts); return empty($parts) ? $last : join(', ', $parts) . " and " . $last; } echo secondsToString(1337.44);

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.0110.00718.80
8.3.50.0070.00718.07
8.3.40.0120.00318.96
8.3.30.0100.00718.84
8.3.20.0050.00320.34
8.3.10.0050.00318.90
8.3.00.0080.00021.76
8.2.180.0070.00718.54
8.2.170.0080.00822.96
8.2.160.0070.00720.55
8.2.150.0000.00724.18
8.2.140.0080.00024.66
8.2.130.0070.00020.65
8.2.120.0040.00426.35
8.2.110.0030.00622.39
8.2.100.0030.00918.03
8.2.90.0050.00319.35
8.2.80.0000.00817.97
8.2.70.0080.00017.72
8.2.60.0000.00918.16
8.2.50.0000.00818.34
8.2.40.0000.00720.77
8.2.30.0040.00419.27
8.2.20.0040.00418.11
8.2.10.0050.00218.08
8.2.00.0000.00718.20
8.1.280.0100.00325.92
8.1.270.0040.00422.17
8.1.260.0070.00026.35
8.1.250.0070.00028.09
8.1.240.0070.00423.98
8.1.230.0070.00417.89
8.1.220.0080.00017.74
8.1.210.0040.00418.77
8.1.200.0040.00417.38
8.1.190.0080.00317.25
8.1.180.0040.00418.10
8.1.170.0060.00318.59
8.1.160.0110.00018.85
8.1.150.0000.00720.38
8.1.140.0040.00419.19
8.1.130.0040.00418.87
8.1.120.0070.00017.55
8.1.110.0000.00717.41
8.1.100.0040.00417.43
8.1.90.0000.00717.41
8.1.80.0060.00317.53
8.1.70.0000.00717.60
8.1.60.0090.00017.53
8.1.50.0040.00417.56
8.1.40.0030.00517.53
8.1.30.0080.00017.67
8.1.20.0040.00417.75
8.1.10.0030.00517.49
8.1.00.0050.00317.59
8.0.300.0060.00318.77
8.0.290.0000.00816.72
8.0.280.0070.00018.59
8.0.270.0000.00717.31
8.0.260.0000.00818.52
8.0.250.0070.00017.07
8.0.240.0070.00016.95
8.0.230.0000.00716.91
8.0.220.0040.00416.97
8.0.210.0070.00016.86
8.0.200.0050.00317.04
8.0.190.0040.00417.03
8.0.180.0030.00516.92
8.0.170.0000.00717.00
8.0.160.0030.00316.95
8.0.150.0070.00016.95
8.0.140.0040.00416.97
8.0.130.0000.00613.38
8.0.120.0030.00616.91
8.0.110.0050.00316.82
8.0.100.0040.00416.99
8.0.90.0000.00716.80
8.0.80.0060.00916.98
8.0.70.0050.00216.92
8.0.60.0040.00416.93
8.0.50.0050.00216.80
8.0.30.0100.00817.13
8.0.20.0140.00517.44
8.0.10.0000.00716.95
8.0.00.0180.00016.79
7.4.330.0000.00515.55
7.4.320.0030.00616.55
7.4.300.0030.00316.52
7.4.290.0000.00716.49
7.4.280.0000.01016.57
7.4.270.0000.00716.72
7.4.260.0030.00616.61
7.4.250.0040.00416.55
7.4.240.0070.00016.58
7.4.230.0000.00716.79
7.4.220.0160.00516.54
7.4.210.0100.00616.64
7.4.200.0040.00416.48
7.4.160.0110.00516.63
7.4.150.0110.00817.40
7.4.140.0080.01217.86
7.4.130.0110.01516.45
7.4.120.0120.00916.58
7.4.110.0180.00316.54
7.4.100.0140.00316.68
7.4.90.0170.00016.43
7.4.80.0090.00619.39
7.4.70.0130.01016.46
7.4.60.0030.01316.40
7.4.50.0060.01016.43
7.4.40.0080.01216.71
7.4.30.0090.00616.64
7.4.00.0000.01314.81
7.3.330.0000.00513.29
7.3.320.0000.00513.26
7.3.310.0030.00316.30
7.3.300.0030.00316.32
7.3.290.0030.00316.41
7.3.280.0030.01416.43
7.3.270.0140.00317.40
7.3.260.0070.01116.47
7.3.250.0140.00516.43
7.3.240.0090.01016.55
7.3.230.0080.00916.41
7.3.210.0110.00816.51
7.3.200.0140.00316.44
7.3.190.0090.00616.58
7.3.180.0090.00616.58
7.3.170.0030.01316.48
7.3.160.0070.01116.61
7.3.10.0030.01016.68
7.3.00.0100.00716.68
7.2.330.0170.00716.90
7.2.320.0100.00716.89
7.2.310.0150.00716.94
7.2.300.0070.01116.54
7.2.290.0070.00916.82
7.2.130.0090.00616.67
7.2.120.0060.00816.81
7.2.110.0110.00716.82
7.2.100.0030.00916.84
7.2.90.0050.00716.87
7.2.80.0090.00516.93
7.2.70.0040.01016.84
7.2.60.0080.00716.87
7.2.50.0090.00316.90
7.2.40.0140.00317.14
7.2.30.0100.00517.04
7.2.20.0070.00516.66
7.2.10.0040.00716.92
7.2.00.0080.00917.26
7.1.250.0020.01115.77
7.1.240.0070.00715.82
7.1.230.0090.00615.73
7.1.220.0070.00715.94
7.1.210.0040.01215.64
7.1.200.0070.00715.69
7.1.190.0100.00315.94
7.1.180.0110.00415.80
7.1.170.0090.00615.86
7.1.160.0120.00615.80
7.1.150.0080.00815.84
7.1.140.0100.00616.05
7.1.130.0070.00715.74
7.1.120.0060.00916.14
7.1.110.0050.01015.86
7.1.100.0060.01016.01
7.1.90.0070.00716.13
7.1.80.0070.00916.06
7.1.70.0050.00915.68
7.1.60.0090.01124.31
7.1.50.0120.00824.48
7.1.40.0180.00623.97
7.1.30.0130.00924.18
7.1.20.0140.00924.26
7.1.10.0050.00915.37
7.1.00.0090.01115.16
7.0.330.0090.00315.04
5.6.380.0100.00314.65

preferences:
35.26 ms | 400 KiB | 5 Q