3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = ['x', 'y', 'z']; foreach($array as &$element) { if ($element=='x') { $element = 'a'; } } var_dump($array);

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.4.20.0040.01517.28
8.4.10.0130.01317.60
8.3.150.0000.01517.05
8.3.140.0120.00618.97
8.3.130.0030.00618.56
8.3.120.0030.00620.91
8.3.110.0070.00320.94
8.3.100.0040.00424.06
8.3.90.0080.00026.77
8.3.80.0030.00619.36
8.3.70.0070.01416.36
8.3.60.0110.00416.38
8.3.50.0110.00721.28
8.3.40.0140.00018.71
8.3.30.0070.00718.39
8.3.20.0000.00820.34
8.3.10.0030.00523.61
8.3.00.0040.00423.45
8.2.270.0080.01116.70
8.2.260.0100.00718.79
8.2.250.0080.00018.25
8.2.240.0030.00619.11
8.2.230.0000.00922.58
8.2.220.0040.00437.54
8.2.210.0120.00626.77
8.2.200.0100.00018.88
8.2.190.0100.00716.63
8.2.180.0140.00718.04
8.2.170.0140.00719.00
8.2.160.0030.01322.96
8.2.150.0080.00024.18
8.2.140.0000.00724.66
8.2.130.0060.00321.13
8.2.120.0070.00026.35
8.2.110.0130.00921.01
8.2.100.0070.00417.78
8.2.90.0000.00818.28
8.2.80.0040.00419.40
8.2.70.0000.00817.50
8.2.60.0000.00817.50
8.2.50.0080.00017.55
8.2.40.0070.00518.42
8.2.30.0080.00417.96
8.2.20.0000.01017.73
8.2.10.0060.00417.81
8.2.00.0000.00718.17
8.1.310.0120.00618.38
8.1.300.0120.00320.03
8.1.290.0030.00630.84
8.1.280.0040.01125.92
8.1.270.0050.00323.99
8.1.260.0080.00426.35
8.1.250.0020.00528.09
8.1.240.0040.00419.14
8.1.230.0000.01120.91
8.1.220.0000.00817.78
8.1.210.0050.00318.91
8.1.200.0060.00317.35
8.1.190.0050.00517.35
8.1.180.0040.00418.10
8.1.170.0040.00418.50
8.1.160.0070.00018.88
8.1.150.0000.00820.61
8.1.140.0030.00519.44
8.1.130.0000.00819.32
8.1.120.0040.00417.42
8.1.110.0040.00417.37
8.1.100.0050.00617.38
8.1.90.0050.00517.45
8.1.80.0060.00617.43
8.1.70.0060.00717.48
8.1.60.0080.00317.52
8.1.50.0100.00417.54
8.1.40.0100.00417.53
8.1.30.0100.00317.61
8.1.20.0100.00117.61
8.1.10.0070.00517.35
8.1.00.0090.00517.34
8.0.300.0040.00319.89
8.0.290.0000.00817.18
8.0.280.0050.00318.35
8.0.270.0030.00317.25
8.0.260.0030.00316.73
8.0.250.0000.00716.93
8.0.240.0040.00416.94
8.0.230.0060.00516.80
8.0.220.0070.00516.82
8.0.210.0100.00116.83
8.0.200.0100.00216.87
8.0.190.0070.00416.84
8.0.180.0040.00616.84
8.0.170.0070.00316.88
8.0.160.0080.00416.80
8.0.150.0100.00216.81
8.0.140.0070.00616.79
8.0.130.0030.00815.06
8.0.120.0060.00716.84
8.0.110.0050.00516.78
8.0.100.0080.00316.84
8.0.90.0060.00616.84
8.0.80.0070.01116.92
8.0.70.0070.00516.79
8.0.60.0060.00616.89
8.0.50.0100.00216.78
8.0.30.0100.00817.00
8.0.20.0100.00817.23
8.0.10.0080.01116.86
8.0.00.0100.00717.07
7.4.330.0000.00516.66
7.4.320.0070.00317.23
7.4.300.0100.00216.58
7.4.290.0040.00516.47
7.4.280.0050.00616.57
7.4.270.0030.00716.54
7.4.260.0080.00216.56
7.4.250.0040.00616.45
7.4.240.0040.00516.55
7.4.230.0050.00516.57
7.4.220.0140.00716.51
7.4.210.0090.00516.48
7.4.200.0050.00516.47
7.4.190.0090.00716.52
7.4.180.0080.00416.45
7.4.160.0070.00816.41
7.4.150.0110.00816.75
7.4.140.0100.01117.12
7.4.130.0090.01116.36
7.4.120.0110.00616.44
7.4.110.0110.00716.50
7.4.100.0080.00916.41
7.4.90.0090.00616.41
7.4.80.0080.00717.41
7.4.70.0100.00416.40
7.4.60.0100.00516.45
7.4.50.0090.00716.38
7.4.40.0130.00416.41
7.4.30.0090.00616.43
7.4.20.0170.00216.42
7.4.10.0080.01016.11
7.4.00.0100.01016.00
7.3.330.0120.00014.60
7.3.320.0060.00516.16
7.3.310.0050.00516.96
7.3.300.0050.00516.18
7.3.290.0070.00416.18
7.3.280.0080.00916.25
7.3.270.0110.00816.68
7.3.260.0130.00716.28
7.3.250.0070.01016.26
7.3.240.0090.00916.30
7.3.230.0120.00716.24
7.3.220.0120.00716.23
7.3.210.0120.00516.27
7.3.200.0090.01017.32
7.3.190.0060.01216.40
7.3.180.0150.00516.32
7.3.170.0120.00616.32
7.3.160.0110.01016.35
7.3.150.0090.00716.24
7.3.140.0120.00716.17
7.3.130.0150.00515.99
7.3.120.0090.00915.97
7.3.110.0100.00915.99
7.3.100.0100.00915.75
7.3.90.0110.00715.85
7.3.80.0100.00915.61
7.3.70.0100.00815.49
7.3.60.0100.00815.31
7.3.50.0110.00815.39
7.3.40.0100.00715.19
7.3.30.0100.00715.08
7.3.20.0310.00715.87
7.3.10.0370.00715.46
7.3.00.0440.00915.39
7.2.340.0200.00616.28
7.2.330.0130.01116.46
7.2.320.0130.01216.35
7.2.310.0110.01116.50
7.2.300.0160.00716.58
7.2.290.0170.00516.44
7.2.280.0190.00816.34
7.2.270.0170.00816.44
7.2.260.0160.00516.09
7.2.250.0120.00916.21
7.2.240.0110.01016.18
7.2.230.0130.00815.95
7.2.220.0140.00715.95
7.2.210.0140.00815.78
7.2.200.0130.00715.68
7.2.190.0130.00815.54
7.2.180.0090.00915.56
7.2.170.0120.00815.45
7.2.160.0110.00815.40
7.2.150.0300.00816.03
7.2.140.0330.00816.13
7.2.130.0510.00615.66
7.2.120.0400.00615.62
7.2.110.0420.00715.65
7.2.100.0520.00915.63
7.2.90.0560.00815.63
7.2.80.0480.00715.62
7.2.70.0510.00715.63
7.2.60.0560.00815.62
7.2.50.0540.00815.59
7.2.40.0540.00815.65
7.2.30.0470.00815.74
7.2.20.0500.01015.74
7.2.10.0420.00715.75
7.2.00.0500.00815.72
7.1.330.0080.00915.54
7.1.320.0120.00815.60
7.1.310.0110.00915.64
7.1.300.0120.00715.22
7.1.290.0120.00915.24
7.1.280.0100.01015.10
7.1.270.0230.01014.99
7.1.260.0190.00915.04
7.1.250.0420.00714.51
7.1.240.0560.00714.48
7.1.230.0450.00814.54
7.1.220.0610.00814.49
7.1.210.0600.00814.47
7.1.200.0580.00814.55
7.1.190.0530.00714.46
7.1.180.0510.00714.47
7.1.170.0590.00714.48
7.1.160.0580.00714.66
7.1.150.0500.00814.65
7.1.140.0490.00914.67
7.1.130.0500.00814.67
7.1.120.0480.00714.64
7.1.110.0450.00914.67
7.1.100.0460.00814.60
7.1.90.0540.00914.59
7.1.80.0460.00714.67
7.1.70.0430.00814.55
7.1.60.0460.00817.25
7.1.50.0400.01017.21
7.1.40.0400.00617.12
7.1.30.0510.00817.17
7.1.20.0480.01017.16
7.1.10.0400.00914.50
7.1.00.0410.00814.52
7.0.330.0440.00714.30
7.0.320.0450.00814.10
7.0.310.0550.00714.16
7.0.300.0530.00814.13
7.0.290.0570.00814.22
7.0.280.0550.00814.19
7.0.270.0470.00814.36
7.0.260.0540.00914.34
7.0.250.0470.00714.37
7.0.240.0410.00714.41
7.0.230.0440.00614.33
7.0.220.0500.00814.33
7.0.210.0440.00814.25
7.0.200.0500.00814.24
7.0.190.0420.00714.27
7.0.180.0480.00814.23
7.0.170.0360.00814.23
7.0.160.0380.00914.21
7.0.150.0390.00814.22
7.0.140.0390.00714.22
7.0.130.0390.00814.28
7.0.120.0390.00714.27
7.0.110.0360.00714.24
7.0.100.0360.00914.19
7.0.90.0370.01014.23
7.0.80.0640.00814.24
7.0.70.0530.00914.25
7.0.60.0360.00714.19
7.0.50.0370.00714.28
7.0.40.0360.00714.29
7.0.30.0380.00714.22
7.0.20.0370.00814.21
7.0.10.0380.00714.23
7.0.00.0330.00814.44
5.6.400.0140.00815.56
5.6.390.0120.00914.68
5.6.380.0130.00814.45
5.6.370.0120.00814.49
5.6.360.0120.00914.50
5.6.350.0140.00914.54
5.6.340.0130.00814.44
5.6.330.0120.00814.50
5.6.320.0130.00814.42
5.6.310.0130.00814.50
5.6.300.0120.01315.01
5.6.290.0120.01414.98
5.6.280.0150.01314.93
5.6.270.0120.01415.00
5.6.260.0130.01415.00
5.6.250.0130.01314.97
5.6.240.0140.01314.99
5.6.230.0140.01214.96
5.6.220.0130.01314.95
5.6.210.0130.01314.98
5.6.200.0150.01214.97
5.6.190.0150.01115.00
5.6.180.0140.01114.97
5.6.170.0140.01314.88
5.6.160.0140.01114.91
5.6.150.0130.01214.96
5.6.140.0130.01214.94
5.6.130.0130.01214.92
5.6.120.0120.01314.98
5.6.110.0140.01314.95
5.6.100.0140.01114.90
5.6.90.0130.01214.92
5.6.80.0140.01014.81
5.6.70.0130.01114.80
5.6.60.0130.01114.82
5.6.50.0130.01214.77
5.6.40.0130.01114.81
5.6.30.0130.01214.79
5.6.20.0120.01114.83
5.6.10.0130.01014.77
5.6.00.0120.01114.83
5.5.380.0140.01013.23
5.5.370.0110.01113.23
5.5.360.0120.01113.28
5.5.350.0120.01113.23
5.5.340.0140.01013.28
5.5.330.0130.01013.27
5.5.320.0130.01113.24
5.5.310.0110.01313.30
5.5.300.0110.01213.22
5.5.290.0120.01113.26
5.5.280.0110.01113.24
5.5.270.0120.01213.24
5.5.260.0130.01113.30
5.5.250.0110.01113.23
5.5.240.0100.01113.16
5.5.230.0110.01113.11
5.5.220.0120.01113.16
5.5.210.0120.01113.23
5.5.200.0120.01013.15
5.5.190.0120.01113.14
5.5.180.0100.01213.13
5.5.170.0100.00813.07
5.5.160.0100.01213.14
5.5.150.0110.01013.14
5.5.140.0110.01113.08
5.5.130.0130.01113.14
5.5.120.0110.01113.12
5.5.110.0130.00913.16
5.5.100.0120.01113.15
5.5.90.0120.01113.16
5.5.80.0120.01013.11
5.5.70.0110.01113.04
5.5.60.0120.01213.09
5.5.50.0130.01213.13
5.5.40.0110.01013.09
5.5.30.0110.01313.10
5.5.20.0120.01013.07
5.5.10.0110.01213.14
5.5.00.0100.01313.01
5.4.260.0060.00217.72
5.3.280.0020.00617.72

preferences:
67.29 ms | 403 KiB | 5 Q