3v4l.org

run code in 300+ PHP versions simultaneously
<?php $messages = [ 'Fout in veld 1', 'Fout in veld 2', 'Fouten in veld 3' => [ 'titel', 'is niet uniek', 'moet minimaal 3 tekens lang zijn', ], 'Fout in veld 6' ]; function rec($messages, $i = 0) { foreach($messages as $title => $message) { if (is_array($message)) { $k = $i + 1; return rec($message, $k); } $output = ''; for ($j = -1; $j < $i; $j++) { $output .= ' - '; } echo $output . $message; } } rec($messages);

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.0140.00418.43
8.3.50.0080.01021.13
8.3.40.0070.00718.64
8.3.30.0120.00318.69
8.3.20.0080.00020.21
8.3.10.0070.00021.77
8.3.00.0040.00420.42
8.2.180.0110.00716.38
8.2.170.0080.00622.96
8.2.160.0040.01120.27
8.2.150.0070.00025.66
8.2.140.0040.00424.66
8.2.130.0080.00026.16
8.2.120.0040.00417.63
8.2.110.0080.00021.97
8.2.100.0080.00417.63
8.2.90.0000.00819.36
8.2.80.0030.00517.97
8.2.70.0030.00617.63
8.2.60.0000.00817.93
8.2.50.0080.00018.07
8.2.40.0000.00819.21
8.2.30.0050.00320.72
8.2.20.0030.00517.73
8.2.10.0000.00718.00
8.2.00.0000.00818.03
8.1.280.0070.00725.92
8.1.270.0100.01023.91
8.1.260.0040.00426.35
8.1.250.0070.00028.09
8.1.240.0080.00020.89
8.1.230.0060.00617.48
8.1.220.0000.00717.78
8.1.210.0080.00018.77
8.1.200.0050.00517.25
8.1.190.0030.00617.23
8.1.180.0000.00818.10
8.1.170.0060.00318.52
8.1.160.0020.00522.07
8.1.150.0040.00418.89
8.1.140.0000.00817.52
8.1.130.0030.00317.71
8.1.120.0000.00717.36
8.1.110.0050.00217.48
8.1.100.0000.00717.44
8.1.90.0040.00417.46
8.1.80.0040.00417.45
8.1.70.0000.00717.50
8.1.60.0050.00217.57
8.1.50.0060.00317.52
8.1.40.0050.00317.52
8.1.30.0000.00817.55
8.1.20.0040.00417.49
8.1.10.0080.00017.50
8.1.00.0000.00817.33
8.0.300.0020.00518.77
8.0.290.0000.00716.75
8.0.280.0000.00718.36
8.0.270.0000.00717.30
8.0.260.0000.00617.16
8.0.250.0040.00317.01
8.0.240.0030.00317.00
8.0.230.0000.00716.93
8.0.220.0090.00016.89
8.0.210.0040.00416.88
8.0.200.0070.00016.93
8.0.190.0000.00816.99
8.0.180.0000.00716.95
8.0.170.0040.00416.79
8.0.160.0070.00016.79
8.0.150.0000.00716.82
8.0.140.0060.00316.88
8.0.130.0050.00013.40
8.0.120.0040.00416.80
8.0.110.0040.00416.88
8.0.100.0050.00316.78
8.0.90.0000.00816.80
8.0.80.0120.00616.80
8.0.70.0000.00716.77
8.0.60.0040.00416.76
8.0.50.0050.00316.76
8.0.30.0130.00317.03
8.0.20.0150.00617.40
8.0.10.0050.00216.86
8.0.00.0100.01016.82
7.4.330.0030.00315.08
7.4.320.0030.00316.43
7.4.300.0060.00016.45
7.4.290.0000.00716.59
7.4.280.0000.00716.44
7.4.270.0040.00316.50
7.4.260.0000.00716.39
7.4.250.0040.00416.57
7.4.240.0040.00316.55
7.4.230.0050.00216.58
7.4.220.0180.00716.63
7.4.210.0070.01016.42
7.4.200.0030.00316.62
7.4.160.0030.01416.63
7.4.150.0060.01217.40
7.4.140.0120.01117.86
7.4.130.0060.01216.47
7.4.120.0120.00516.55
7.4.110.0120.00616.60
7.4.100.0140.00316.46
7.4.90.0090.00916.48
7.4.80.0080.00819.39
7.4.70.0100.00716.73
7.4.60.0070.01016.63
7.4.50.0080.00016.31
7.4.40.0120.00616.53
7.4.30.0080.00916.66
7.4.00.0060.01014.79
7.3.330.0000.00513.13
7.3.320.0020.00213.29
7.3.310.0070.00016.20
7.3.300.0000.00716.28
7.3.290.0100.00616.31
7.3.280.0080.00816.30
7.3.270.0130.00517.40
7.3.260.0110.00716.63
7.3.250.0090.00816.44
7.3.240.0120.00916.43
7.3.230.0110.00616.63
7.3.210.0120.00416.65
7.3.200.0060.00916.41
7.3.190.0060.01016.42
7.3.180.0060.00916.32
7.3.170.0080.01216.43
7.3.160.0080.00816.38
7.2.330.0090.01016.44
7.2.320.0060.01216.90
7.2.310.0090.00916.53
7.2.300.0070.01016.31
7.2.290.0090.01216.48
7.2.110.0110.01116.59
7.2.60.0100.00316.95
7.2.00.0090.00619.07
7.1.200.0060.00915.69
7.1.100.0840.01116.20
7.1.70.0040.00417.28
7.1.60.0140.01019.29
7.1.50.0060.01616.84
7.1.00.0070.07322.51
7.0.200.0030.00516.70
7.0.60.0070.07319.79
7.0.50.0100.03317.94
7.0.40.0070.04020.11
7.0.30.0270.08320.15
7.0.20.0230.05320.24
7.0.10.0030.09320.26
7.0.00.0100.08020.19
5.6.280.0070.06021.16
5.6.210.0000.04320.55
5.6.200.0070.08018.16
5.6.190.0030.04720.53
5.6.180.0130.04020.63
5.6.170.0230.04020.45
5.6.160.0070.08720.46
5.6.150.0030.05318.27
5.6.140.0000.04318.25
5.6.130.0130.05318.21
5.6.120.0030.04321.14
5.6.110.0070.03721.02
5.6.100.0100.04020.96
5.6.90.0000.05720.98
5.6.80.0070.07320.53
5.5.350.3900.04020.50
5.5.340.0100.06017.96
5.5.330.0100.08020.27
5.5.320.0230.04020.19
5.5.310.0200.04720.27
5.5.300.0100.07717.93
5.5.290.0000.06317.93
5.5.280.0030.08720.74
5.5.270.0030.06720.87
5.5.260.0030.08020.72
5.5.250.0000.07720.62
5.5.240.0000.03320.36
5.4.450.0670.05319.64
5.4.440.0170.06319.59
5.4.430.0200.05019.56
5.4.420.0170.05319.41
5.4.410.0570.04719.25
5.4.400.0600.06318.86
5.4.390.0800.05319.20
5.4.380.0770.06018.83
5.4.370.0900.04319.27
5.4.360.0630.07319.04
5.4.350.0730.05319.24
5.4.340.0770.04719.09
5.4.320.0730.05719.26
5.4.310.0830.04319.09
5.4.300.0870.05019.05
5.4.290.0830.05018.91
5.4.280.0930.03718.91
5.4.270.0730.05019.21
5.4.260.0770.04719.04
5.4.250.0730.05319.08
5.4.240.0800.04719.09
5.4.230.0700.05019.30
5.4.220.0800.05319.09
5.4.210.0870.05019.08
5.4.200.0870.04019.24
5.4.190.0630.05319.08
5.4.180.0770.04719.08
5.4.170.0600.05319.20
5.4.160.0630.05018.90
5.4.150.0600.07318.84
5.4.140.0530.05316.41
5.4.130.0600.05716.40
5.4.120.0270.05016.46
5.4.110.0100.05016.25
5.4.100.0070.05316.19
5.4.90.0600.05016.54
5.4.80.0800.05016.53
5.4.70.0200.03316.27
5.4.60.0100.05016.54
5.4.50.0230.05716.53
5.4.40.0300.06316.34
5.4.30.0100.06016.48
5.4.20.0030.05316.52
5.4.10.0270.04716.42

preferences:
46.82 ms | 401 KiB | 5 Q