3v4l.org

run code in 300+ PHP versions simultaneously
<?php<?php define('SECONDE', 1); define('MINUUT', 60*SECONDE); define('UUR', 60*MINUUT); define('DAG', 24*UUR); // Bezochtte tijd function timetostr($tijd) { $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.0150.00618.68
8.3.50.0150.00321.21
8.3.40.0140.00018.69
8.3.30.0110.00419.20
8.3.20.0000.00720.29
8.3.10.0080.00022.10
8.3.00.0050.00222.34
8.2.180.0040.01118.29
8.2.170.0100.00722.96
8.2.160.0070.00720.34
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0070.00026.16
8.2.120.0000.00719.77
8.2.110.0040.00422.12
8.2.100.0040.00817.78
8.2.90.0040.00419.28
8.2.80.0060.00319.16
8.2.70.0030.00617.88
8.2.60.0030.00617.93
8.2.50.0080.00018.07
8.2.40.0030.00518.22
8.2.30.0040.00418.05
8.2.20.0050.00317.80
8.2.10.0000.00817.78
8.2.00.0060.00317.70
8.1.280.0030.01325.92
8.1.270.0100.00020.48
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0090.00023.80
8.1.230.0110.00018.93
8.1.220.0030.00517.79
8.1.210.0040.00418.77
8.1.200.0030.00617.35
8.1.190.0040.00417.53
8.1.180.0000.00818.82
8.1.170.0080.00018.61
8.1.160.0040.00422.22
8.1.150.0040.00418.70
8.1.140.0040.00417.47
8.1.130.0070.00017.89
8.1.120.0000.00817.47
8.1.110.0040.00417.35
8.1.100.0040.00417.53
8.1.90.0040.00417.51
8.1.80.0050.00217.45
8.1.70.0030.00317.46
8.1.60.0000.00817.65
8.1.50.0000.00817.55
8.1.40.0030.00517.46
8.1.30.0030.00517.61
8.1.20.0000.00817.67
8.1.10.0040.00417.60
8.1.00.0000.00917.55
8.0.300.0040.00418.77
8.0.290.0000.00817.18
8.0.280.0030.00318.40
8.0.270.0030.00317.34
8.0.260.0000.00616.86
8.0.250.0000.00717.02
8.0.240.0050.00316.97
8.0.230.0040.00416.94
8.0.220.0050.00216.93
8.0.210.0030.00316.84
8.0.200.0000.00717.05
8.0.190.0000.00716.97
8.0.180.0030.00616.90
8.0.170.0000.00916.98
8.0.160.0040.00416.99
8.0.150.0000.00716.89
8.0.140.0000.00816.83
8.0.130.0000.00513.31
8.0.120.0040.00416.87
8.0.110.0040.00416.96
8.0.100.0000.00717.05
8.0.90.0040.00416.81
8.0.80.0110.00416.96
8.0.70.0040.00417.00
8.0.60.0050.00316.77
8.0.50.0040.00416.88
8.0.30.0080.01217.13
8.0.20.0130.00617.40
8.0.10.0080.00017.14
8.0.00.0090.00816.81
7.4.330.0000.00515.00
7.4.320.0070.00016.80
7.4.300.0050.00216.83
7.4.290.0050.00216.70
7.4.280.0040.00416.64
7.4.270.0040.00416.67
7.4.260.0070.00016.82
7.4.250.0000.00716.70
7.4.240.0060.00216.76
7.4.230.0030.00316.84
7.4.220.0120.00616.75
7.4.210.0070.00916.76
7.4.200.0070.00016.75
7.4.190.0030.00316.71
7.4.160.0150.00016.88
7.4.150.0150.00317.40
7.4.140.0100.01417.86
7.4.130.0140.00316.73
7.4.120.0090.00816.76
7.4.110.0130.00416.68
7.4.100.0120.00616.63
7.4.90.0070.01016.79
7.4.80.0120.00619.39
7.4.70.0040.01416.65
7.4.60.0070.01716.71
7.4.50.0000.00416.79
7.4.40.0090.00622.77
7.4.30.0210.00316.66
7.3.330.0000.00513.11
7.3.320.0000.00613.21
7.3.310.0070.00016.65
7.3.300.0030.00316.43
7.3.290.0090.00616.61
7.3.280.0100.00716.58
7.3.270.0090.00917.40
7.3.260.0140.00316.77
7.3.250.0050.01216.81
7.3.240.0130.00716.61
7.3.230.0150.00416.90
7.3.210.0080.00816.56
7.3.200.0030.01519.39
7.3.190.0140.00416.57
7.3.180.0080.00816.55
7.3.170.0110.00716.64
7.3.160.0090.00616.69
7.2.330.0130.00616.86
7.2.320.0090.00916.93
7.2.310.0090.00916.93
7.2.300.0000.01616.76
7.2.290.0060.01017.03
5.4.320.0050.04412.52
5.4.310.0090.04012.51
5.4.300.0040.03912.52
5.4.290.0050.04512.51
5.4.280.0030.03912.41
5.4.270.0110.03412.41
5.4.260.0050.03812.41
5.4.250.0130.07318.64
5.4.240.0100.05018.82
5.4.230.0030.05318.99
5.4.220.0130.05019.00
5.4.210.0170.06718.94
5.4.200.0030.05718.96
5.4.190.0170.04318.93
5.4.180.0170.04318.93
5.4.170.0130.04318.89
5.4.160.0100.05018.98
5.4.150.0100.05318.73
5.4.140.0100.04716.34
5.4.130.0100.04716.51
5.4.120.0100.06316.36
5.4.110.0070.05316.38
5.4.100.0070.04716.36
5.4.90.0070.05016.38
5.4.80.0130.06316.65
5.4.70.0070.05316.45
5.4.60.0030.05316.36
5.4.50.0030.05016.40
5.4.40.0100.04716.54
5.4.30.0030.05316.45
5.4.20.0070.04716.36
5.4.10.0170.04016.48
5.4.00.0100.04715.70
5.3.290.0060.04012.80
5.3.280.0070.05314.51
5.3.270.0100.05314.60
5.3.260.0100.05014.61
5.3.250.0130.04714.70
5.3.240.0100.05014.46
5.3.230.0070.05314.77
5.3.220.0100.05014.66
5.3.210.0170.04314.49
5.3.200.0130.04714.66
5.3.190.0130.05014.65
5.3.180.0130.04314.76
5.3.170.0100.04714.57
5.3.160.0170.04314.76
5.3.150.0070.05314.66
5.3.140.0130.05014.55
5.3.130.0170.04714.58
5.3.120.0100.05014.74
5.3.110.0200.04014.79
5.3.100.0130.05313.96
5.3.90.0070.05014.00
5.3.80.0000.05314.14
5.3.70.0100.06014.00
5.3.60.0070.05314.23
5.3.50.0030.05314.18
5.3.40.0130.04714.14
5.3.30.0100.04314.00
5.3.20.0070.05313.93
5.3.10.0030.07013.74
5.3.00.0030.07313.66
5.2.170.0070.04011.14
5.2.160.0070.04011.14
5.2.150.0100.03311.16
5.2.140.0030.04311.13
5.2.130.0070.03711.11
5.2.120.0070.03311.33
5.2.110.0130.03011.19
5.2.100.0130.03711.11
5.2.90.0000.04711.18
5.2.80.0070.04011.09
5.2.70.0030.04011.29
5.2.60.0100.05011.25
5.2.50.0030.04311.13
5.2.40.0100.03311.01
5.2.30.0100.05311.09
5.2.20.0000.04311.07
5.2.10.0030.03710.88
5.2.00.0030.03710.84
5.1.60.0030.0339.99
5.1.50.0030.03310.10
5.1.40.0100.0279.97
5.1.30.0000.05710.30
5.1.20.0030.03710.37
5.1.10.0130.03710.13
5.1.00.0030.04010.13
5.0.50.0070.0238.57
5.0.40.0000.0438.42
5.0.30.0070.0438.34
5.0.20.0030.0338.36
5.0.10.0030.0408.13
5.0.00.0030.0478.33
4.4.90.0030.0206.96
4.4.80.0030.0206.96
4.4.70.0000.0236.96
4.4.60.0000.0206.96
4.4.50.0030.0276.96
4.4.40.0070.0306.96
4.4.30.0070.0206.96
4.4.20.0030.0236.96
4.4.10.0000.0236.96
4.4.00.0170.0376.96
4.3.110.0000.0236.96
4.3.100.0030.0306.96
4.3.90.0070.0176.96
4.3.80.0030.0306.96
4.3.70.0070.0276.96
4.3.60.0030.0276.96
4.3.50.0000.0236.96
4.3.40.0000.0336.96
4.3.30.0030.0206.96
4.3.20.0000.0236.96
4.3.10.0030.0206.96
4.3.00.0030.0277.19

preferences:
63.34 ms | 401 KiB | 5 Q