3v4l.org

run code in 300+ PHP versions simultaneously
<?php function format(array &$collection) { foreach($collection as $k => $v) { $collection["prefix_{$k}"] = $v; } } $collection = array('a' => 1, 'b' => 2, 'c' => 3); var_dump($collection); format($collection); var_dump($collection);

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.00416.63
8.3.50.0170.00517.49
8.3.40.0120.00318.73
8.3.30.0120.00618.75
8.3.20.0030.00518.52
8.3.10.0050.00320.52
8.3.00.0080.00019.51
8.2.180.0080.00816.50
8.2.170.0100.00322.96
8.2.160.0100.00720.88
8.2.150.0050.00324.18
8.2.140.0060.00324.66
8.2.130.0080.00026.16
8.2.120.0050.00319.23
8.2.110.0000.00919.20
8.2.100.0000.01217.72
8.2.90.0080.00319.41
8.2.80.0090.00019.23
8.2.70.0080.00017.75
8.2.60.0030.00618.05
8.2.50.0040.00418.07
8.2.40.0000.00817.97
8.2.30.0020.00518.20
8.2.20.0000.00717.60
8.2.10.0060.00317.68
8.2.00.0060.00317.82
8.1.280.0140.00725.92
8.1.270.0130.00624.66
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0030.00622.71
8.1.230.0040.00821.05
8.1.220.0030.00517.74
8.1.210.0050.00918.86
8.1.200.0060.00317.35
8.1.190.0040.00417.53
8.1.180.0040.00418.10
8.1.170.0030.00518.81
8.1.160.0040.00418.95
8.1.150.0080.00018.58
8.1.140.0040.00417.50
8.1.130.0030.00317.75
8.1.120.0000.00717.50
8.1.110.0050.00217.46
8.1.100.0000.00717.40
8.1.90.0100.00017.41
8.1.80.0030.00417.50
8.1.70.0000.00717.45
8.1.60.0000.00817.48
8.1.50.0030.00517.49
8.1.40.0000.00717.57
8.1.30.0070.00017.64
8.1.20.0030.00617.49
8.1.10.0030.00517.51
8.1.00.0030.00617.52
8.0.300.0000.00919.84
8.0.290.0000.00716.75
8.0.280.0000.00818.38
8.0.270.0030.00317.17
8.0.260.0030.00316.80
8.0.250.0080.00017.09
8.0.240.0000.00717.03
8.0.230.0070.00016.88
8.0.220.0030.00316.91
8.0.210.0030.00316.95
8.0.200.0030.00317.04
8.0.190.0040.00417.05
8.0.180.0040.00417.02
8.0.170.0030.00516.94
8.0.160.0030.00516.89
8.0.150.0030.00616.80
8.0.140.0030.00716.82
8.0.130.0030.00313.41
8.0.120.0000.00716.90
8.0.110.0050.00216.77
8.0.100.0040.00416.90
8.0.90.0000.00717.02
8.0.80.0030.01316.95
8.0.70.0070.00016.99
8.0.60.0050.00216.91
8.0.50.0000.00716.85
8.0.30.0120.00817.09
8.0.20.0100.00917.01
8.0.10.0050.00317.18
8.0.00.0070.01317.04
7.4.330.0000.00513.03
7.4.320.0030.00316.41
7.4.300.0030.00316.50
7.4.290.0030.00316.43
7.4.280.0040.00416.52
7.4.270.0060.00016.59
7.4.260.0030.00313.37
7.4.250.0080.00016.49
7.4.240.0040.00416.46
7.4.230.0030.00316.61
7.4.220.0060.01416.65
7.4.210.0070.00916.53
7.4.200.0030.00316.68
7.4.190.0000.00716.57
7.4.160.0080.00816.33
7.4.150.0070.01116.50
7.4.140.0150.01016.48
7.4.130.0080.00916.45
7.4.120.0160.00316.53
7.4.110.0070.01016.61
7.4.100.0100.01016.61
7.4.90.0140.01116.64
7.4.80.0150.00619.39
7.4.70.0090.00916.40
7.4.60.0050.01416.38
7.4.50.0030.00616.48
7.4.40.0060.00816.43
7.4.30.0070.01716.75
7.4.00.0100.00515.02
7.3.330.0020.00513.23
7.3.320.0030.00313.22
7.3.310.0070.00016.26
7.3.300.0030.00316.33
7.3.290.0130.00716.36
7.3.280.0110.00816.34
7.3.270.0040.02216.34
7.3.260.0110.00816.27
7.3.250.0090.00816.52
7.3.240.0110.01116.57
7.3.230.0150.00316.48
7.3.210.0030.01416.38
7.3.200.0100.01016.44
7.3.190.0070.01516.62
7.3.180.0090.00616.67
7.3.170.0070.01416.28
7.3.160.0030.01616.32
7.3.120.0040.01214.99
7.3.110.0070.00715.10
7.3.100.0100.00714.78
7.3.90.0040.00415.09
7.3.80.0060.00314.77
7.3.70.0040.00815.02
7.3.60.0080.00814.56
7.3.50.0100.00314.81
7.3.40.0030.01214.63
7.3.30.0040.00714.71
7.3.20.0090.00616.63
7.3.10.0030.01116.72
7.3.00.0100.00516.65
7.2.330.0060.01216.36
7.2.320.0130.00616.43
7.2.310.0150.00616.46
7.2.300.0050.01016.66
7.2.290.0060.01516.80
7.2.250.0060.01215.12
7.2.240.0120.00915.04
7.2.230.0100.00615.16
7.2.220.0030.00615.05
7.2.210.0070.00715.04
7.2.200.0040.00814.98
7.2.190.0070.00714.96
7.2.180.0040.00815.01
7.2.170.0030.01414.94
7.2.130.0070.00716.64
7.2.120.0060.00616.86
7.2.110.0090.00616.87
7.2.100.0040.01216.85
7.2.90.0080.00816.66
7.2.80.0090.00916.93
7.2.70.0000.01416.91
7.2.60.0060.00816.83
7.2.50.0060.00916.98
7.2.40.0070.00716.74
7.2.30.0100.00716.91
7.2.20.0070.00716.76
7.2.10.0060.00916.91
7.2.00.0020.01118.20
7.1.330.0090.00615.77
7.1.320.0120.00316.05
7.1.310.0040.01115.72
7.1.300.0060.00615.59
7.1.290.0060.00315.58
7.1.280.0070.01016.02
7.1.270.0030.00915.43
7.1.260.0080.00815.87
7.1.250.0070.00715.87
7.1.200.0060.00015.99
7.1.100.0080.00417.87
7.1.70.0050.00217.26
7.1.60.0170.00719.40
7.1.50.0100.01017.10
7.1.00.0030.07722.35
7.0.200.0100.00714.73
7.0.140.0030.07322.15
7.0.120.0070.05722.17
7.0.70.0030.05321.92
7.0.60.0000.05321.75
7.0.50.0070.06022.02
7.0.40.0000.09020.03
7.0.30.0100.06320.10
7.0.20.0100.08320.11
7.0.10.0030.06020.02
7.0.00.0070.08720.09
5.6.280.0300.14085.07
5.6.220.0430.12384.61
5.6.210.0200.09784.69
5.6.200.0230.11384.96
5.6.190.0370.13084.98
5.6.180.0430.13084.89
5.6.170.0270.08784.93
5.6.160.0270.12785.05
5.6.150.0270.13384.91
5.6.140.0430.13084.90
5.6.130.0170.13385.01
5.6.120.0500.13085.07
5.6.110.0300.14784.88
5.6.100.0330.12385.00
5.6.90.0230.14784.95
5.6.80.0330.13084.26
5.6.70.0230.09384.39
5.6.60.0270.15384.44
5.6.50.0300.13384.36
5.6.40.0370.14384.42
5.6.30.0200.13084.34
5.6.20.0370.12784.36
5.6.10.0370.14384.38
5.6.00.0470.11384.30
5.5.360.0330.13084.43
5.5.350.0300.10084.36
5.5.340.0270.12784.80
5.5.330.0300.08384.73
5.5.320.0300.10084.86
5.5.310.0230.09084.86
5.5.300.0200.15384.76
5.5.290.0300.15084.82
5.5.280.0200.09784.66
5.5.270.0230.15384.84
5.5.260.0230.14084.84
5.5.250.0370.13784.61
5.5.240.0270.14784.18
5.5.230.0330.13784.11
5.5.220.0270.14084.17
5.5.210.0230.13384.13
5.5.200.0330.12784.06
5.5.190.0200.15384.09
5.5.180.0270.11784.08
5.5.160.0270.10784.16
5.5.150.0470.11784.02
5.5.140.0270.08384.21
5.5.130.0430.10383.93
5.5.120.0330.13384.16
5.5.110.0200.09084.10
5.5.100.0300.09084.03
5.5.90.0370.13383.98
5.5.80.0170.11083.89
5.5.70.0270.12783.87
5.5.60.0230.15384.00
5.5.50.0400.11383.97
5.5.40.0270.09083.97
5.5.30.0330.14083.96
5.5.20.0230.08384.08
5.5.10.0130.09084.05
5.5.00.0330.13784.05
5.4.450.0330.12383.23
5.4.440.0270.10383.23
5.4.430.0370.13083.29
5.4.420.0230.08083.18
5.4.410.0370.13083.05
5.4.400.0330.12782.90
5.4.390.0470.09382.96
5.4.380.0330.12782.89
5.4.370.0200.14782.81
5.4.360.0270.13382.72
5.4.350.0570.09782.71
5.4.340.0330.09383.00
5.4.320.0130.10782.90
5.4.310.0300.13782.98
5.4.300.0330.10082.98
5.4.290.0370.12082.97
5.4.280.0200.15083.07
5.4.270.0330.12782.75
5.4.260.0500.12382.77
5.4.250.0230.08782.76
5.4.240.0270.07382.75
5.4.230.0270.12382.85
5.4.220.0270.13782.88
5.4.210.0300.14382.90
5.4.200.0330.14082.79
5.4.190.0270.13082.85
5.4.180.0230.09782.97
5.4.170.0370.14083.07
5.4.160.0370.13782.88
5.4.150.0200.15783.06
5.4.140.0370.14080.32
5.4.130.0370.13780.25
5.4.120.0330.13080.34
5.4.110.0370.13780.36
5.4.100.0200.09780.26
5.4.90.0400.13780.19
5.4.80.0300.13080.20
5.4.70.0230.11780.26
5.4.60.0370.14080.39
5.4.50.0400.10080.30
5.4.40.0330.11780.16
5.4.30.0170.13380.19
5.4.20.0330.09080.16
5.4.10.0400.11380.21
5.4.00.0200.14779.73
5.3.290.0230.18077.50
5.3.280.0300.17377.34
5.3.270.0270.19077.38
5.3.260.0200.19377.46
5.3.250.0230.17377.36
5.3.240.0200.19377.48
5.3.230.0270.17378.07
5.3.220.0230.16377.29
5.3.210.0170.12077.36
5.3.200.0270.16077.31
5.3.190.0270.16377.46
5.3.180.0300.16377.46
5.3.170.0100.15777.41
5.3.160.0230.15077.26
5.3.150.0300.18077.46
5.3.140.0130.14777.34
5.3.130.0300.15377.27
5.3.120.0470.14777.36
5.3.110.0270.13777.27
5.3.100.0270.17376.83
5.3.90.0200.15776.88
5.3.80.0300.16076.87
5.3.70.0230.11376.71
5.3.60.0200.11776.67
5.3.50.0270.11076.73
5.3.40.0370.14776.73
5.3.30.0200.17776.61
5.3.20.0170.18776.59
5.3.10.0200.11376.39
5.3.00.0270.11076.46
5.2.170.0200.11774.40
5.2.160.0200.16374.27
5.2.150.0370.16374.35
5.2.140.0300.13374.25
5.2.130.0300.14074.22
5.2.120.0230.12374.29
5.2.110.0200.10774.24
5.2.100.0200.10374.29
5.2.90.0230.11074.25
5.2.80.0170.08774.18
5.2.70.0200.10774.27
5.2.60.0270.10374.23
5.2.50.0170.09074.19
5.2.40.0230.12074.17
5.2.30.0170.12374.10
5.2.20.0200.10074.20
5.2.10.0130.94374.09
5.2.00.1732.317221.45
5.1.60.4172.057802.24
5.1.50.5071.947814.98
5.1.40.4931.947821.87
5.1.30.4671.760740.30
5.1.20.4371.767733.04
5.1.10.6571.270536.41
5.1.01.2330.780323.52
5.0.50.0070.04312.79
5.0.40.0070.03312.79
5.0.30.0030.05712.79
5.0.20.0030.04312.79
5.0.10.0030.04312.79
5.0.00.0030.06312.79
4.4.90.0000.02712.79
4.4.80.0000.02312.79
4.4.70.0030.01312.79
4.4.60.0000.01312.79
4.4.50.0000.01312.79
4.4.40.0030.05312.79
4.4.30.0000.03712.79
4.4.20.0070.03012.79
4.4.10.0000.03312.79
4.4.00.0030.05712.79
4.3.110.0030.03012.79
4.3.100.0000.03312.79
4.3.90.0030.03312.79
4.3.80.0000.04312.79
4.3.70.0000.03712.79
4.3.60.0000.03312.79
4.3.50.0000.03712.79
4.3.40.0030.04312.79
4.3.30.0030.02312.79
4.3.20.0000.03712.79
4.3.10.0030.02312.79
4.3.00.0000.03712.79

preferences:
59.34 ms | 401 KiB | 5 Q