3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = array(1 => 'a', 2 => 'b', 3 => 'c'); $b = array_flip(array(1, 2)); print_r(array_replace(array(1, 2), array(2,3)));

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.0130.00716.63
8.3.50.0040.01121.99
8.3.40.0110.00418.42
8.3.30.0100.00319.01
8.3.20.0030.00620.18
8.3.10.0070.00023.64
8.3.00.0050.00319.67
8.2.180.0210.00016.32
8.2.170.0110.00622.96
8.2.160.0030.01020.47
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0000.00726.16
8.2.120.0060.00319.23
8.2.110.0060.00322.26
8.2.100.0110.00017.84
8.2.90.0070.00019.13
8.2.80.0050.00317.97
8.2.70.0060.00317.59
8.2.60.0000.00817.80
8.2.50.0030.00718.07
8.2.40.0080.00418.03
8.2.30.0040.00418.17
8.2.20.0070.00017.51
8.2.10.0000.00717.95
8.2.00.0050.00217.64
8.1.280.0140.00725.92
8.1.270.0000.00823.80
8.1.260.0070.00026.35
8.1.250.0040.00428.09
8.1.240.0030.00623.88
8.1.230.0110.00019.16
8.1.220.0000.00817.74
8.1.210.0040.00418.77
8.1.200.0100.00017.23
8.1.190.0000.00816.87
8.1.180.0030.00618.10
8.1.170.0000.00918.45
8.1.160.0000.00721.95
8.1.150.0040.00418.43
8.1.140.0040.00417.27
8.1.130.0030.00317.66
8.1.120.0040.00417.41
8.1.110.0070.00417.37
8.1.100.0040.00417.36
8.1.90.0030.00317.40
8.1.80.0030.00317.39
8.1.70.0030.00317.30
8.1.60.0040.00417.43
8.1.50.0000.00817.44
8.1.40.0050.00317.41
8.1.30.0080.00017.46
8.1.20.0000.00817.54
8.1.10.0050.00317.46
8.1.00.0000.00717.39
8.0.300.0030.00318.77
8.0.290.0030.00316.58
8.0.280.0040.00418.38
8.0.270.0030.00317.27
8.0.260.0030.00317.14
8.0.250.0030.00316.83
8.0.240.0050.00316.88
8.0.230.0030.00316.87
8.0.220.0030.00316.68
8.0.210.0030.00316.83
8.0.200.0000.00716.88
8.0.190.0070.00016.90
8.0.180.0000.00716.77
8.0.170.0040.00416.83
8.0.160.0000.00716.82
8.0.150.0030.00516.80
8.0.140.0040.00416.68
8.0.130.0000.00513.24
8.0.120.0000.00816.87
8.0.110.0030.00516.69
8.0.100.0000.00716.68
8.0.90.0070.00016.64
8.0.80.0100.00616.77
8.0.70.0000.00816.89
8.0.60.0000.00716.83
8.0.50.0000.00716.68
8.0.30.0110.01016.90
8.0.20.0090.01317.40
8.0.10.0080.00016.91
8.0.00.0070.01016.61
7.4.330.0050.00015.03
7.4.320.0090.00016.29
7.4.300.0060.00016.48
7.4.290.0040.00416.48
7.4.280.0040.00416.44
7.4.270.0000.00816.42
7.4.260.0060.00316.51
7.4.250.0070.00016.44
7.4.240.0000.00816.39
7.4.230.0070.00016.55
7.4.220.0160.00316.45
7.4.210.0100.00316.36
7.4.200.0050.00216.50
7.4.160.0030.01316.48
7.4.150.0130.00617.40
7.4.140.0110.00617.86
7.4.130.0140.00616.55
7.4.120.0050.01216.36
7.4.110.0140.00416.55
7.4.100.0100.01316.47
7.4.90.0160.00316.42
7.4.80.0180.00419.39
7.4.70.0100.00616.32
7.4.60.0100.00616.32
7.4.50.0000.00616.17
7.4.40.0100.00716.30
7.4.30.0100.00616.52
7.4.00.0100.01014.92
7.3.330.0000.00513.04
7.3.320.0060.00013.02
7.3.310.0060.00016.16
7.3.300.0030.00316.11
7.3.290.0080.00516.09
7.3.280.0110.00816.14
7.3.270.0140.00317.40
7.3.260.0140.00716.10
7.3.250.0120.00716.39
7.3.240.0070.01016.40
7.3.230.0110.00616.39
7.3.210.0090.00816.30
7.3.200.0120.00919.39
7.3.190.0160.00016.07
7.3.180.0090.00616.13
7.3.170.0120.00316.38
7.3.160.0040.01216.11
7.3.120.0030.01214.48
7.3.110.0110.00714.51
7.3.100.0130.00014.67
7.3.90.0040.01114.74
7.3.80.0090.00614.66
7.3.70.0100.00714.49
7.3.60.0030.01014.58
7.3.50.0040.01414.68
7.3.40.0070.00714.84
7.3.30.0040.01114.43
7.3.20.0030.01416.51
7.3.10.0080.00816.33
7.3.00.0080.00516.65
7.2.330.0040.01216.33
7.2.320.0050.01116.33
7.2.310.0110.00616.16
7.2.300.0170.00016.54
7.2.290.0090.00616.64
7.2.250.0030.01414.54
7.2.240.0070.01414.84
7.2.230.0060.00314.81
7.2.220.0090.00614.74
7.2.210.0030.01515.08
7.2.200.0070.00714.84
7.2.190.0120.00014.57
7.2.180.0040.00814.75
7.2.170.0040.00814.65
7.2.160.0070.00714.91
7.2.150.0000.01816.72
7.2.140.0140.00316.48
7.2.130.0070.00416.50
7.2.120.0050.00916.58
7.2.110.0050.00716.72
7.2.100.0100.00116.74
7.2.90.0030.01016.73
7.2.80.0050.00716.66
7.2.70.0080.00616.66
7.2.60.0070.00716.68
7.2.50.0020.01416.66
7.2.40.0040.00816.62
7.2.30.0080.00616.83
7.2.20.0060.00816.43
7.2.10.0030.00616.58
7.2.00.0030.01017.47
7.1.330.0060.00815.78
7.1.320.0070.01015.58
7.1.310.0110.00415.76
7.1.300.0030.01115.66
7.1.290.0060.00615.64
7.1.280.0000.01115.69
7.1.270.0060.01015.61
7.1.260.0060.00615.68
7.1.250.0030.00715.56
7.1.200.0070.00415.56
7.1.100.0040.00718.14
7.1.70.0000.00716.94
7.1.60.0130.01019.70
7.1.50.0120.01216.81
7.1.00.0000.07722.36
7.0.200.0070.00516.64
7.0.140.0000.07722.07
7.0.60.0070.08319.85
7.0.50.0030.04017.84
7.0.40.0100.07020.11
7.0.30.0300.07720.21
7.0.20.0200.04320.23
7.0.10.0200.04720.24
7.0.00.0070.08320.09
5.6.280.0070.07020.90
5.6.210.0030.06320.47
5.6.200.0030.04018.19
5.6.190.0100.04320.55
5.6.180.0170.07320.41
5.6.170.0070.05020.51
5.6.160.0100.06020.52
5.6.150.0070.08318.18
5.6.140.0000.06018.23
5.6.130.0100.07318.23
5.6.120.0030.04321.09
5.6.110.0130.07721.08
5.6.100.0170.07321.13
5.6.90.0070.04021.12
5.6.80.0000.04020.36
5.6.70.4470.03720.43
5.5.350.0130.07720.48
5.5.340.0100.07318.02
5.5.330.0070.08020.27
5.5.320.0200.04320.24
5.5.310.0270.07720.41
5.5.300.0030.04017.94
5.5.290.0130.04017.95
5.5.280.0070.05320.88
5.5.270.0000.04320.66
5.5.260.0070.06320.75
5.5.250.0070.08020.57
5.5.240.0170.07320.27
5.4.450.0500.04743.90
5.4.440.0330.04743.86
5.4.430.0300.03743.79
5.4.420.0270.04743.77
5.4.410.0200.04043.77
5.4.400.0300.04343.77
5.4.390.0270.04743.90
5.4.380.0100.05718.53
5.4.370.0200.04718.52
5.4.360.0070.05718.55
5.4.350.0230.04318.66
5.4.340.0130.05318.72
5.4.320.0050.04512.48
5.4.310.0060.03712.48
5.4.300.0070.03512.48
5.4.290.0060.03812.48
5.4.280.0030.03812.38
5.4.270.0060.04012.38
5.4.260.0060.03912.38
5.4.250.0050.03912.38
5.4.240.0070.03412.38
5.4.230.0070.04112.37
5.4.220.0040.04212.37
5.4.210.0080.03512.37
5.4.200.0050.04312.37
5.4.190.0080.03612.37
5.4.180.0070.04612.37
5.4.170.0060.04212.38
5.4.160.0070.03812.38
5.4.150.0070.03812.37
5.4.140.0070.03612.05
5.4.130.0070.03912.04
5.4.120.0050.03712.00
5.4.110.0070.03512.00
5.4.100.0050.03611.99
5.4.90.0060.03711.99
5.4.80.0050.04111.99
5.4.70.0090.03111.98
5.4.60.0100.04011.99
5.4.50.0080.04111.98
5.4.40.0050.03911.98
5.4.30.0050.04111.97
5.4.20.0080.03211.97
5.4.10.0060.03411.97
5.4.00.0080.04311.46
5.3.290.0080.03712.80
5.3.280.0100.04012.70
5.3.270.0060.03812.72
5.3.260.0080.04212.71
5.3.250.0100.03512.72
5.3.240.0070.04412.72
5.3.230.0050.03812.70
5.3.220.0060.03712.68
5.3.210.0070.03912.68
5.3.200.0080.03412.68
5.3.190.0070.04512.67
5.3.180.0050.03612.68
5.3.170.0090.03712.66
5.3.160.0090.03312.67
5.3.150.0050.04412.67
5.3.140.0020.04012.66
5.3.130.0060.03812.66
5.3.120.0080.03712.66
5.3.110.0060.04512.65
5.3.100.0080.03512.12
5.3.90.0090.03612.09
5.3.80.0070.03412.07
5.3.70.0080.03412.08
5.3.60.0090.03712.06
5.3.50.0070.03612.01
5.3.40.0030.03912.01
5.3.30.0070.03411.97
5.3.20.0080.03311.75
5.3.10.0040.03711.72
5.3.00.0060.03611.70
5.2.170.0060.0299.19
5.2.160.0060.0279.18
5.2.150.0050.0299.18
5.2.140.0060.0299.18
5.2.130.0070.0269.14
5.2.120.0060.0279.14
5.2.110.0060.0319.15
5.2.100.0050.0289.14
5.2.90.0030.0309.14
5.2.80.0070.0289.14
5.2.70.0080.0279.14
5.2.60.0050.0309.09
5.2.50.0060.0299.06
5.2.40.0050.0289.04
5.2.30.0050.0369.01
5.2.20.0040.0299.00
5.2.10.0030.0338.93
5.2.00.0050.0288.78
5.1.60.0050.0318.07
5.1.50.0090.0258.06
5.1.40.0050.0298.05
5.1.30.0070.0238.40
5.1.20.0080.0308.41
5.1.10.0060.0288.14
5.1.00.0030.0318.14
5.0.50.0040.0206.62
5.0.40.0040.0186.48
5.0.30.0040.0336.29
5.0.20.0030.0266.27
5.0.10.0040.0286.23
5.0.00.0040.0336.23
4.4.90.0040.0224.77
4.4.80.0040.0144.75
4.4.70.0010.0174.76
4.4.60.0040.0174.75
4.4.50.0050.0234.77
4.4.40.0040.0294.71
4.4.30.0040.0134.76
4.4.20.0010.0254.85
4.4.10.0030.0194.84
4.4.00.0080.0244.76
4.3.110.0030.0204.67
4.3.100.0020.0174.66
4.3.90.0030.0154.64
4.3.80.0040.0234.59
4.3.70.0020.0164.63
4.3.60.0050.0164.63
4.3.50.0000.0184.63
4.3.40.0020.0254.54
4.3.30.0040.0143.28
4.3.20.0020.0163.26
4.3.10.0030.0153.21
4.3.00.0070.01743.77

preferences:
48.47 ms | 401 KiB | 5 Q