3v4l.org

run code in 300+ PHP versions simultaneously
<?php define('SECONDE', 1); define('MINUUT', 60*SECONDE); define('UUR', 60*MINUUT); define('DAG', 24*UUR); // Bezochtte tijd function timetostr($tijd) { $output = ''; $result['dag'] = (int) ($tijd/DAG); $tijd = $tijd % DAG; $result['uur'] = (int) ($tijd/UUR); $tijd = $tijd % UUR; $result['minuut'] = (int) ($tijd/MINUUT); $tijd = $tijd % MINUUT; $result['seconde'] = $tijd; if ($result['dag']) $output[] = $result['dag'] . ($result['dag'] == 1 ? ' dag' : ' dagen'); if ($output || $result['uur']) $output[] = $result['uur'] . ($result['uur'] == 1 ? ' uur' : ' uren'); if ($output || $result['minuut']) $output[] = $result['minuut'] . ($result['minuut'] == 1 ? ' minuut' : ' minuten'); $output[] = $result['seconde'] . ($result['seconde'] == 1 ? ' seconde' : ' seconden'); $return = join($output, ', '); $return = preg_replace('/^(.*), ([^,]+)$/', '\\1 en \\2', $return); return $return; } echo timetostr(12345); ?>

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.0070.01418.43
8.3.50.0110.00521.27
8.3.40.0090.01219.09
8.3.30.0120.00319.21
8.3.20.0040.00420.39
8.3.10.0080.00021.97
8.3.00.0030.00622.51
8.2.180.0070.00718.54
8.2.170.0200.00022.96
8.2.160.0040.00920.43
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0090.00926.16
8.2.120.0040.00419.78
8.2.110.0060.00320.53
8.2.100.0070.00419.70
8.2.90.0030.00619.35
8.2.80.0050.00319.30
8.2.70.0040.00417.50
8.2.60.0060.00317.93
8.2.50.0000.00818.07
8.2.40.0050.00218.03
8.2.30.0040.00418.25
8.2.20.0030.00517.80
8.2.10.0070.00017.82
8.2.00.0040.00417.68
8.1.280.0090.00925.92
8.1.270.0030.00520.54
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0030.00523.82
8.1.230.0040.00719.09
8.1.220.0060.00317.74
8.1.210.0000.00818.77
8.1.200.0060.00317.47
8.1.190.0040.00417.43
8.1.180.0050.00318.97
8.1.170.0000.00818.61
8.1.160.0030.00622.20
8.1.150.0070.00018.69
8.1.140.0000.00717.45
8.1.130.0040.00417.83
8.1.120.0000.00717.50
8.1.110.0000.00717.36
8.1.100.0040.00317.41
8.1.90.0000.00717.46
8.1.80.0000.00717.51
8.1.70.0000.00717.40
8.1.60.0080.00017.55
8.1.50.0000.00817.58
8.1.40.0060.00317.42
8.1.30.0000.00817.55
8.1.20.0080.00017.49
8.1.10.0080.00017.61
8.1.00.0050.00517.55
8.0.300.0080.00018.77
8.0.290.0050.00217.05
8.0.280.0070.00018.36
8.0.270.0030.00317.18
8.0.260.0000.00618.46
8.0.250.0000.00716.94
8.0.240.0000.00816.92
8.0.230.0030.00316.91
8.0.220.0070.00016.96
8.0.210.0030.00316.95
8.0.200.0060.00016.89
8.0.190.0000.00717.05
8.0.180.0040.00416.82
8.0.170.0000.00716.99
8.0.160.0000.00817.01
8.0.150.0070.00016.81
8.0.140.0030.00516.85
8.0.130.0000.00513.37
8.0.120.0000.00816.91
8.0.110.0000.00717.01
8.0.100.0030.00517.07
8.0.90.0030.00516.75
8.0.80.0090.00916.88
8.0.70.0000.00716.97
8.0.60.0040.00416.76
8.0.50.0040.00416.77
8.0.30.0050.01317.17
8.0.20.0100.00817.40
8.0.10.0040.00417.09
8.0.00.0110.00616.83
7.4.330.0050.00015.00
7.4.320.0000.00616.62
7.4.300.0030.00316.55
7.4.290.0030.00316.60
7.4.280.0000.00716.38
7.4.270.0040.00416.54
7.4.260.0070.00016.38
7.4.250.0050.00316.62
7.4.240.0000.00716.55
7.4.230.0030.00316.61
7.4.220.0140.00316.60
7.4.210.0040.01116.53
7.4.200.0000.00816.61
7.4.190.0030.00316.62
7.4.160.0120.00416.51
7.4.150.0100.00717.40
7.4.140.0110.00917.86
7.4.130.0090.01016.55
7.4.120.0100.00716.52
7.4.110.0130.00716.68
7.4.100.0070.01116.70
7.4.90.0100.00716.60
7.4.80.0110.01119.39
7.4.70.0130.01016.43
7.4.60.0060.01216.59
7.4.50.0000.00416.76
7.4.40.0080.00522.77
7.4.30.0120.00916.46
7.4.00.0060.00914.92
7.3.330.0000.00613.25
7.3.320.0000.00613.24
7.3.310.0030.00316.29
7.3.300.0030.00316.49
7.3.290.0070.01316.44
7.3.280.0100.00916.41
7.3.270.0090.00917.40
7.3.260.0100.00716.75
7.3.250.0090.00916.53
7.3.240.0060.01216.68
7.3.230.0060.01616.53
7.3.210.0130.00616.48
7.3.200.0110.01119.39
7.3.190.0120.00416.38
7.3.180.0120.00316.37
7.3.170.0100.00516.55
7.3.160.0090.00616.48
7.3.120.0070.00415.17
7.3.10.0040.01116.72
7.3.00.0060.00616.56
7.2.330.0100.00716.82
7.2.320.0090.00916.55
7.2.310.0090.00916.84
7.2.300.0090.00616.71
7.2.290.0100.00716.67
7.2.130.0070.01016.95
7.2.120.0070.00316.93
7.2.110.0030.01016.95
7.2.100.0030.00616.68
7.2.90.0030.00616.69
7.2.80.0040.01117.12
7.2.70.0060.00316.93
7.2.60.0050.00816.94
7.2.50.0090.00916.95
7.2.40.0060.00916.78
7.2.30.0080.00016.92
7.2.20.0080.00416.82
7.2.10.0080.00817.06
7.2.00.0080.00318.32
7.1.250.0040.00715.75
7.1.200.0090.00615.86
7.1.100.0000.01318.13
7.1.70.0040.00416.93
7.1.60.0030.01319.82
7.1.50.0070.01416.90
7.1.00.0000.08022.37
7.0.200.0090.00016.91
7.0.140.0100.06722.12
7.0.100.0170.07719.99
7.0.90.0100.08019.94
7.0.80.0100.08020.18
7.0.70.0130.04319.98
7.0.60.0070.08020.02
7.0.50.0000.08320.39
7.0.40.0030.08020.05
7.0.30.0100.08320.04
7.0.20.0100.06020.11
7.0.10.0030.09020.07
7.0.00.0170.06719.95
5.6.280.0030.07020.93
5.6.250.0030.05320.79
5.6.240.0100.07720.69
5.6.230.0130.07720.54
5.6.220.0070.08320.69
5.6.210.0170.04720.61
5.6.200.0130.07721.05
5.6.190.0130.08021.04
5.6.180.0070.08321.19
5.6.170.0130.04321.04
5.6.160.0130.07721.05
5.6.150.0130.07720.95
5.6.140.0130.07321.06
5.6.130.0100.08321.06
5.6.120.0070.08320.93
5.6.110.0030.08721.18
5.6.100.0100.07321.08
5.6.90.0130.08020.94
5.6.80.0170.07320.49
5.6.70.0170.05320.41
5.6.60.0030.05720.48
5.6.50.0030.09020.57
5.6.40.0070.08020.33
5.6.30.0100.07320.42
5.6.20.0100.07720.37
5.6.10.0030.08020.54
5.6.00.0100.07720.49
5.5.380.0100.08020.41
5.5.370.0030.05320.38
5.5.360.0070.09020.41
5.5.350.0070.08020.49
5.5.340.0070.05020.75
5.5.330.0130.07720.90
5.5.320.0070.08020.89
5.5.310.0130.07720.65
5.5.300.0070.08020.93
5.5.290.0130.07320.84
5.5.280.0030.05720.85
5.5.270.0100.05020.90
5.5.260.0030.09020.93
5.5.250.0070.04720.76
5.5.240.0170.06320.29
5.5.230.0130.06720.29
5.5.220.0030.08320.19
5.5.210.0030.07020.28
5.5.200.0030.05320.29
5.5.190.0130.07020.14
5.5.180.0030.08020.16
5.5.160.0070.08019.98
5.5.150.0100.07320.23
5.5.140.0030.05020.20
5.5.130.0200.05720.00
5.5.120.0130.06720.20
5.5.110.0170.07020.25
5.5.100.0030.08020.10
5.5.90.0030.08020.16
5.5.80.0170.05720.11
5.5.70.0200.07020.14
5.5.60.0130.06719.97
5.5.50.0070.08320.06
5.5.40.0000.08320.13
5.5.30.0070.08020.07
5.5.20.0170.06719.94
5.5.10.0100.07720.11
5.5.00.0100.06320.05
5.4.450.0030.06719.47
5.4.440.0070.07719.41
5.4.430.0100.07719.37
5.4.420.0130.07019.51
5.4.410.0100.07019.43
5.4.400.0100.07319.05
5.4.390.0030.05719.18
5.4.380.0070.07319.10
5.4.370.0070.07019.23
5.4.360.0130.07319.18
5.4.350.0100.07719.14
5.4.340.0130.04719.24
5.4.320.0170.02719.05
5.4.310.0100.07018.85
5.4.300.0070.07719.04
5.4.290.0030.04719.13
5.4.280.0070.04319.14
5.4.270.0230.04319.21
5.4.260.0100.06719.14
5.4.250.0030.07718.87
5.4.240.0170.06718.84
5.4.230.0070.07018.90
5.4.220.0130.07019.04
5.4.210.0130.07018.87
5.4.200.0130.06319.02
5.4.190.0030.07719.03
5.4.180.0000.07319.02
5.4.170.0100.07319.07
5.4.160.0030.05318.93
5.4.150.0130.07319.02
5.4.140.0030.06716.26
5.4.130.0070.07016.19
5.4.120.0070.07316.19
5.4.110.0030.08016.40
5.4.100.0070.07316.50
5.4.90.0070.07016.50
5.4.80.0100.07016.53
5.4.70.0100.04316.46
5.4.60.0100.06316.41
5.4.50.0000.06316.32
5.4.40.0070.06716.36
5.4.30.0070.07316.24
5.4.20.0100.06716.35
5.4.10.0070.05316.37
5.4.00.0100.06315.59
5.3.290.0030.04014.63
5.3.280.0070.04314.75
5.3.270.0100.07714.68
5.3.260.0030.07714.66
5.3.250.0130.07014.73
5.3.240.0070.07014.68
5.3.230.0100.06314.61
5.3.220.0070.04314.59
5.3.210.0070.07314.65
5.3.200.0000.08314.72
5.3.190.0130.07014.65
5.3.180.0070.04714.63
5.3.170.0030.08314.54
5.3.160.0100.07014.63
5.3.150.0030.05714.53
5.3.140.0100.07014.59
5.3.130.0130.07314.69
5.3.120.0100.07014.57
5.3.110.0100.07314.52
5.3.100.0000.08314.09
5.3.90.0130.04314.16
5.3.80.0070.08013.92
5.3.70.0130.03714.09
5.3.60.0030.07013.95
5.3.50.0130.06713.88
5.3.40.0070.06314.06
5.3.30.0130.06313.84
5.3.20.0000.08313.71
5.3.10.0070.06713.74
5.3.00.0070.07713.64
5.2.170.0070.06011.08
5.2.160.0070.06011.25
5.2.150.0070.06011.23
5.2.140.0070.06011.27
5.2.130.0100.05711.11
5.2.120.0070.04011.03
5.2.110.0100.05711.03
5.2.100.0070.06011.14
5.2.90.0030.06311.18
5.2.80.0030.06311.09
5.2.70.0070.04711.17
5.2.60.0070.06311.13
5.2.50.0070.05710.92
5.2.40.0100.05010.93
5.2.30.0070.06011.07
5.2.20.0000.06310.91
5.2.10.0100.05710.96
5.2.00.0100.05310.60
5.1.60.0000.05010.12
5.1.50.0070.05010.08
5.1.40.0100.0279.99
5.1.30.0030.05710.35
5.1.20.0070.05710.39
5.1.10.0030.05310.18
5.1.00.0070.03310.14
5.0.50.0130.0379.79
5.0.40.0030.0439.79
5.0.30.0000.0639.79
5.0.20.0070.0409.79
5.0.10.0070.0409.79
5.0.00.0030.0609.79
4.4.90.0100.0309.79
4.4.80.0130.0209.79
4.4.70.0030.0379.79
4.4.60.0000.0379.79
4.4.50.0030.0339.79
4.4.40.0030.0309.79
4.4.30.0070.0309.79
4.4.20.0070.0339.79
4.4.10.0000.0339.79
4.4.00.0000.0539.79
4.3.110.0030.0339.79
4.3.100.0030.0339.79
4.3.90.0030.0339.79
4.3.80.0070.0509.79
4.3.70.0070.0309.79
4.3.60.0070.0309.79
4.3.50.0070.0309.79
4.3.40.0070.0479.79
4.3.30.0000.0379.79
4.3.20.0000.0339.79
4.3.10.0070.0339.79
4.3.00.0000.0379.79

preferences:
47.07 ms | 401 KiB | 5 Q