3v4l.org

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

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.0120.00318.43
8.3.50.0100.00621.92
8.3.40.0070.00718.66
8.3.30.0070.01019.07
8.3.20.0040.00420.07
8.3.10.0070.00022.09
8.3.00.0000.00822.48
8.2.180.0170.00018.43
8.2.170.0150.00022.96
8.2.160.0200.00022.08
8.2.150.0000.00724.18
8.2.140.0080.00024.66
8.2.130.0090.00926.16
8.2.120.0110.00419.23
8.2.110.0100.00022.25
8.2.100.0040.00720.98
8.2.90.0040.00419.25
8.2.80.0000.00818.04
8.2.70.0060.00317.50
8.2.60.0040.00817.52
8.2.50.0060.00318.07
8.2.40.0040.00418.16
8.2.30.0040.00417.98
8.2.20.0080.00017.57
8.2.10.0030.00619.42
8.2.00.0040.00417.72
8.1.280.0150.00025.92
8.1.270.0000.00721.98
8.1.260.0050.00226.35
8.1.250.0070.00728.09
8.1.240.0040.00423.83
8.1.230.0030.00719.09
8.1.220.0000.00717.74
8.1.210.0000.00818.77
8.1.200.0000.00817.11
8.1.190.0000.00817.18
8.1.180.0060.00318.10
8.1.170.0040.00418.57
8.1.160.0020.00521.95
8.1.150.0050.00318.57
8.1.140.0000.00717.34
8.1.130.0000.00717.80
8.1.120.0000.00717.36
8.1.110.0040.00417.35
8.1.100.0030.00317.31
8.1.90.0070.00017.28
8.1.80.0020.00517.37
8.1.70.0070.00017.36
8.1.60.0030.00517.41
8.1.50.0000.00917.44
8.1.40.0040.00417.46
8.1.30.0040.00417.55
8.1.20.0080.00017.54
8.1.10.0040.00417.43
8.1.00.0050.00217.32
8.0.300.0050.00318.77
8.0.290.0040.00417.16
8.0.280.0000.00718.36
8.0.270.0030.00317.14
8.0.260.0030.00316.66
8.0.250.0070.00016.75
8.0.240.0030.00716.77
8.0.230.0030.00316.94
8.0.220.0080.00016.80
8.0.210.0000.00716.69
8.0.200.0030.00316.80
8.0.190.0040.00416.93
8.0.180.0040.00416.82
8.0.170.0030.00516.75
8.0.160.0000.00716.79
8.0.150.0030.00316.81
8.0.140.0040.00416.66
8.0.130.0030.00613.26
8.0.120.0000.00716.75
8.0.110.0050.00316.85
8.0.100.0050.00316.80
8.0.90.0040.00416.71
8.0.80.0130.00716.80
8.0.70.0000.00816.76
8.0.60.0070.00016.82
8.0.50.0000.00716.70
8.0.30.0100.00917.09
8.0.20.0070.01117.40
8.0.10.0030.00616.81
8.0.00.0120.00716.70
7.4.330.0060.00015.08
7.4.320.0030.00316.52
7.4.300.0000.00716.50
7.4.290.0000.00716.45
7.4.280.0040.00416.52
7.4.270.0030.00316.57
7.4.260.0000.00916.54
7.4.250.0040.00416.50
7.4.240.0070.00016.49
7.4.230.0000.00716.54
7.4.220.0110.00716.47
7.4.210.0080.00716.41
7.4.200.0000.00716.55
7.4.190.0000.00716.46
7.4.160.0060.01016.30
7.4.150.0100.01017.40
7.4.140.0070.01217.86
7.4.130.0150.00316.45
7.4.120.0060.01116.39
7.4.110.0040.01416.54
7.4.100.0100.00716.29
7.4.90.0080.00916.45
7.4.80.0090.01019.39
7.4.70.0080.00816.50
7.4.60.0100.00916.34
7.4.50.0040.00416.29
7.4.40.0000.01822.77
7.4.30.0110.00616.36
7.4.00.0040.00814.79
7.3.330.0040.00412.95
7.3.320.0000.00612.93
7.3.310.0060.00016.12
7.3.300.0000.00616.19
7.3.290.0100.00716.20
7.3.280.0100.00816.20
7.3.270.0080.00817.40
7.3.260.0110.00516.24
7.3.250.0110.00816.12
7.3.240.0090.00816.46
7.3.230.0100.00716.39
7.3.210.0110.00616.52
7.3.200.0130.00319.39
7.3.190.0090.01216.52
7.3.180.0150.00016.60
7.3.170.0170.00016.41
7.3.160.0000.01716.18
7.3.120.0090.00614.56
7.3.10.0070.01016.52
7.3.00.0030.01016.58
7.2.330.0110.00916.42
7.2.320.0100.01016.54
7.2.310.0080.00816.55
7.2.300.0070.01016.51
7.2.290.0100.00716.38
7.2.130.0070.00316.85
7.2.120.0050.00516.85
7.2.110.0100.00016.53
7.2.100.0070.00716.55
7.2.90.0070.00716.74
7.2.80.0080.00416.82
7.2.70.0040.00816.91
7.2.60.0040.01116.96
7.2.50.0030.00916.75
7.2.40.0060.01216.82
7.2.30.0100.00716.96
7.2.20.0060.01216.84
7.2.10.0040.01216.80
7.2.00.0040.01218.06
7.1.250.0070.00315.71
7.1.100.0030.00718.13
7.1.70.0040.00416.90
7.1.60.0070.01719.82
7.1.50.0070.01716.70
7.1.00.0100.07022.28
7.0.200.0030.00716.34
7.0.140.0030.06722.05
7.0.60.0070.07720.04
7.0.50.0000.05017.95
7.0.40.0070.08320.13
7.0.30.0470.07720.23
7.0.20.0230.05320.08
7.0.10.0070.05320.10
7.0.00.0070.08320.07
5.6.280.0000.07721.01
5.6.210.0030.04020.54
5.6.200.0130.03718.24
5.6.190.0170.07720.78
5.6.180.0330.04320.67
5.6.170.0400.04720.54
5.6.160.0230.07720.43
5.6.150.0070.03718.15
5.6.140.0070.08018.14
5.6.130.0070.04018.13
5.6.120.0070.06320.73
5.6.110.0130.08020.97
5.6.100.0100.07721.03
5.6.90.0100.06020.99
5.6.80.0030.05020.36
5.5.350.0130.07720.44
5.5.340.0100.05317.92
5.5.330.0030.08720.34
5.5.320.0400.07320.29
5.5.310.0170.07020.35
5.5.300.0070.07717.96
5.5.290.0130.08018.04
5.5.280.0030.04020.87
5.5.270.0100.07320.83
5.5.260.0070.07020.95
5.5.250.0130.03320.46
5.5.240.0170.07720.11
5.4.450.1170.04019.55
5.4.440.0470.04019.21
5.4.430.0500.03719.52
5.4.420.0770.02719.47
5.4.410.1270.04319.19
5.4.400.0300.03719.17
5.4.390.0430.02319.24
5.4.380.0270.06018.46
5.4.370.0330.06018.54
5.4.360.0200.07018.81
5.4.350.0370.06318.69
5.4.340.0430.05318.78
5.4.320.0020.04012.48
5.4.310.0070.03712.48
5.4.300.0100.03512.48
5.4.290.0060.04012.48
5.4.280.0110.04612.38
5.4.270.0130.06718.75
5.4.260.0170.04318.84
5.4.250.0130.06718.94
5.4.240.0070.06018.84
5.4.230.0130.05018.98
5.4.220.0130.06318.98
5.4.210.0200.07018.96
5.4.200.0200.06318.73
5.4.190.0000.06318.93
5.4.180.0100.07018.97
5.4.170.0100.05018.92
5.4.160.0200.06018.88
5.4.150.0130.06318.88
5.4.140.0100.06016.39
5.4.130.0070.05316.49
5.4.120.0100.05716.40
5.4.110.0100.05716.64
5.4.100.0130.05716.55
5.4.90.0100.05316.42
5.4.80.0230.05716.37
5.4.70.0100.07016.46
5.4.60.0170.06716.50
5.4.50.0030.07016.38
5.4.40.0070.05316.41
5.4.30.0030.05716.34
5.4.20.0030.07716.55
5.4.10.0000.06316.62
5.4.00.0100.05715.84
5.3.290.0060.04012.80
5.3.280.0130.06314.57
5.3.270.0000.08014.50
5.3.260.0100.06314.61
5.3.250.0070.07314.68
5.3.240.0200.06014.68
5.3.230.0000.06314.56
5.3.220.0130.06714.64
5.3.210.0100.06014.63
5.3.200.0170.05314.62
5.3.190.0170.06714.46
5.3.180.0200.06314.71
5.3.170.0200.05014.55
5.3.160.0000.06314.57
5.3.150.0000.06014.53
5.3.140.0030.05714.74
5.3.130.0130.05314.51
5.3.120.0100.05014.51
5.3.110.0130.07314.55
5.3.100.0000.06013.86
5.3.90.0130.06014.14
5.3.80.0070.05714.09
5.3.70.0100.05714.09
5.3.60.0100.05314.07
5.3.50.0100.06013.93
5.3.40.0070.05714.03
5.3.30.0030.06713.88
5.3.20.0200.05313.70
5.3.10.0030.05013.82
5.3.00.0130.04713.64
5.2.170.0000.04711.22
5.2.160.0000.04311.31
5.2.150.0030.06011.13
5.2.140.0200.03711.29
5.2.130.0130.04011.06
5.2.120.0270.03011.09
5.2.110.0130.05011.18
5.2.100.0170.04711.04
5.2.90.0030.04311.22
5.2.80.0100.04011.30
5.2.70.0100.04011.13
5.2.60.0130.04011.03
5.2.50.0000.05311.08
5.2.40.0130.04311.07
5.2.30.0030.04311.14
5.2.20.0100.04011.02
5.2.10.0070.04711.07
5.2.00.0030.04310.88
5.1.60.0100.04310.08
5.1.50.0000.0539.98
5.1.40.0100.0379.89
5.1.30.0070.04010.23
5.1.20.0030.05710.52
5.1.10.0070.0509.97
5.1.00.0130.05010.13
5.0.50.0130.0308.50
5.0.40.0030.0338.39
5.0.30.0030.0438.21
5.0.20.0100.0278.15
5.0.10.0030.0408.08
5.0.00.0070.0578.25
4.4.90.0000.0306.15
4.4.80.0000.0306.15
4.4.70.0030.0206.15
4.4.60.0030.0236.15
4.4.50.0000.0236.15
4.4.40.0030.0436.15
4.4.30.0030.0236.15
4.4.20.0070.0306.15
4.4.10.0070.0276.15
4.4.00.0100.0406.15
4.3.110.0030.0236.15
4.3.100.0030.0276.15
4.3.90.0030.0306.15
4.3.80.0030.0436.15
4.3.70.0070.0176.15
4.3.60.0030.0236.15
4.3.50.0000.0276.15
4.3.40.0030.0406.15
4.3.30.0070.0206.15
4.3.20.0030.0236.15
4.3.10.0030.0236.15
4.3.00.0030.01713.50

preferences:
46.88 ms | 401 KiB | 5 Q