3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = [3,4,5,6,7,1,2,3]; $a = 50; $pos = array_search(max($arr), $arr); var_dump($arr);

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.0180.00318.18
8.3.50.0170.00521.04
8.3.40.0140.00318.57
8.3.30.0150.00018.42
8.3.20.0020.00520.22
8.3.10.0080.00021.82
8.3.00.0000.00819.56
8.2.180.0170.00416.63
8.2.170.0070.00722.96
8.2.160.0090.00620.35
8.2.150.0000.00724.18
8.2.140.0080.00024.66
8.2.130.0030.00626.16
8.2.120.0040.00417.75
8.2.110.0130.00722.30
8.2.100.0120.00017.50
8.2.90.0000.00819.05
8.2.80.0000.00817.97
8.2.70.0060.00317.38
8.2.60.0030.00517.91
8.2.50.0040.00418.07
8.2.40.0000.00819.37
8.2.30.0050.00319.85
8.2.20.0000.00717.65
8.2.10.0040.00417.97
8.2.00.0080.00018.05
8.1.280.0070.01425.92
8.1.270.0200.00020.39
8.1.260.0070.00026.35
8.1.250.0000.00728.09
8.1.240.0090.00022.53
8.1.230.0120.00017.42
8.1.220.0080.00017.74
8.1.210.0060.00318.77
8.1.200.0060.00617.22
8.1.190.0050.00317.13
8.1.180.0070.00018.10
8.1.170.0000.00918.52
8.1.160.0000.00721.86
8.1.150.0040.00418.72
8.1.140.0000.00817.30
8.1.130.0070.00017.67
8.1.120.0000.00717.38
8.1.110.0000.00717.38
8.1.100.0040.00417.27
8.1.90.0000.00717.27
8.1.80.0000.00817.28
8.1.70.0000.00717.36
8.1.60.0000.00817.41
8.1.50.0080.00017.44
8.1.40.0090.00017.34
8.1.30.0000.00917.58
8.1.20.0000.00717.61
8.1.10.0070.00017.43
8.1.00.0000.00817.33
8.0.300.0080.00018.77
8.0.290.0080.00016.75
8.0.280.0030.00318.30
8.0.270.0030.00317.18
8.0.260.0000.00617.22
8.0.250.0000.00816.88
8.0.240.0030.00316.89
8.0.230.0030.00316.75
8.0.220.0030.00316.79
8.0.210.0000.00716.88
8.0.200.0000.00616.87
8.0.190.0070.00416.79
8.0.180.0040.00416.72
8.0.170.0070.00016.85
8.0.160.0030.00316.75
8.0.150.0000.00716.75
8.0.140.0040.00416.80
8.0.130.0080.00013.24
8.0.120.0000.00716.80
8.0.110.0070.00016.74
8.0.100.0040.00416.59
8.0.90.0070.00016.67
8.0.80.0070.00716.86
8.0.70.0060.00316.66
8.0.60.0040.00416.80
8.0.50.0070.00016.72
8.0.30.0100.00717.15
8.0.20.0100.01017.40
8.0.10.0020.00516.86
8.0.00.0090.00916.65
7.4.330.0000.00715.08
7.4.320.0050.00216.41
7.4.300.0030.00316.51
7.4.290.0050.00516.52
7.4.280.0040.00416.54
7.4.270.0000.00616.51
7.4.260.0070.00016.51
7.4.250.0000.00916.53
7.4.240.0060.00216.44
7.4.230.0040.00416.45
7.4.220.0070.01016.50
7.4.210.0100.01016.50
7.4.200.0070.00016.37
7.4.160.0060.00916.16
7.4.150.0160.00317.40
7.4.140.0160.00717.86
7.4.130.0100.00716.51
7.4.120.0100.01016.47
7.4.110.0110.00716.36
7.4.100.0120.00916.51
7.4.90.0080.00916.26
7.4.80.0110.00619.39
7.4.70.0090.00616.21
7.4.60.0120.00416.25
7.4.50.0030.00616.22
7.4.40.0090.00616.28
7.4.30.0090.00916.43
7.4.00.0030.01014.49
7.3.330.0000.00513.04
7.3.320.0030.00313.05
7.3.310.0000.00615.95
7.3.300.0070.00016.10
7.3.290.0120.00716.13
7.3.280.0110.00516.12
7.3.270.0130.00317.40
7.3.260.0090.00916.16
7.3.250.0120.00516.29
7.3.240.0120.00616.38
7.3.230.0040.01316.39
7.3.210.0120.00416.30
7.3.200.0070.01016.24
7.3.190.0060.01016.39
7.3.180.0090.00616.51
7.3.170.0190.00316.52
7.3.160.0060.01216.07
7.2.330.0140.00316.62
7.2.320.0150.00316.30
7.2.310.0100.01016.34
7.2.300.0100.01016.36
7.2.290.0120.00616.56
7.2.00.0410.00818.89
7.1.100.0740.01116.28
7.1.70.0060.00317.04
7.1.60.0000.01019.12
7.1.50.0040.00716.83
7.1.00.0070.07322.29
7.0.200.0100.00316.81
7.0.60.0300.05719.91
7.0.50.0030.08717.85
7.0.40.0000.05020.24
7.0.30.0300.08020.24
7.0.20.0230.04720.41
7.0.10.0100.08020.09
7.0.00.0130.06720.00
5.6.280.0000.06721.02
5.6.210.0100.06020.54
5.6.200.0200.07018.12
5.6.190.0100.06720.43
5.6.180.0230.04020.63
5.6.170.0300.07320.38
5.6.160.0030.08718.11
5.6.150.0030.04018.18
5.6.140.0130.06018.18
5.6.130.0070.08318.07
5.6.120.0030.05020.99
5.6.110.0030.08720.96
5.6.100.0130.08021.04
5.6.90.0030.08020.96
5.6.80.0100.08020.40
5.5.350.0030.04020.30
5.5.340.0100.07017.96
5.5.330.0030.05720.23
5.5.320.0400.07320.28
5.5.310.0230.07020.29
5.5.300.0130.05018.01
5.5.290.0030.05017.96
5.5.280.0070.03720.88
5.5.270.0000.04320.95
5.5.260.0100.07020.95
5.5.250.0200.07320.55
5.5.240.3270.03020.34
5.4.450.0570.05719.41
5.4.440.0800.05719.46
5.4.430.0670.05719.63
5.4.420.0670.06019.56
5.4.410.0800.06719.38
5.4.400.0630.05019.24
5.4.390.0600.05018.77
5.4.380.0570.05718.93
5.4.370.0570.05319.09
5.4.360.0570.06019.31
5.4.350.0600.04719.32
5.4.340.0600.05019.24
5.4.320.0630.05719.22
5.4.310.0630.04719.30
5.4.300.0600.04719.13
5.4.290.0730.05319.30
5.4.280.0830.05319.22
5.4.270.0770.06019.23
5.4.260.0530.05319.12
5.4.250.0830.06318.98
5.4.240.0570.05018.82
5.4.230.0530.05318.98
5.4.220.0570.05719.28
5.4.210.0600.05318.99
5.4.200.0570.05318.79
5.4.190.0670.04018.98
5.4.180.0800.05319.12
5.4.170.0200.05019.15
5.4.160.0030.05718.75
5.4.150.0070.05719.05
5.4.140.0370.04716.28
5.4.130.0600.04716.23
5.4.120.0570.05316.38
5.4.110.0630.04316.45
5.4.100.0730.04316.52
5.4.90.0800.04316.54
5.4.80.0700.05316.27
5.4.70.0070.04716.48
5.4.60.0270.06316.16
5.4.50.0030.07016.47
5.4.40.0000.05316.38
5.4.30.0030.05316.04
5.4.20.0070.07016.40

preferences:
58.21 ms | 401 KiB | 5 Q