3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = array('foo' => 123, 'bar' => true, 987 => 'test', '0' => 'blah', 'baz' => 'blah') ; $needle = 'bar'; echo array_search(array_search($needle,$array),array_keys($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.3.60.0190.00018.20
8.3.50.0080.01121.02
8.3.40.0100.00318.56
8.3.30.0030.01718.68
8.3.20.0050.00318.66
8.3.10.0040.00421.09
8.3.00.0080.00019.56
8.2.180.0090.00916.32
8.2.170.0140.00322.96
8.2.160.0070.00720.46
8.2.150.0000.00824.18
8.2.140.0000.00824.66
8.2.130.0040.00426.16
8.2.120.0000.00821.03
8.2.110.0030.00620.52
8.2.100.0040.00717.91
8.2.90.0000.00819.22
8.2.80.0040.00417.97
8.2.70.0000.01017.50
8.2.60.0100.00017.93
8.2.50.0030.00618.07
8.2.40.0080.00018.22
8.2.30.0000.00719.49
8.2.20.0040.00417.68
8.2.10.0000.00717.67
8.2.00.0060.00617.63
8.1.280.0090.00925.92
8.1.270.0000.00823.99
8.1.260.0000.00826.35
8.1.250.0000.00728.09
8.1.240.0060.00322.47
8.1.230.0100.00020.87
8.1.220.0090.00018.77
8.1.210.0000.00718.77
8.1.200.0090.00017.35
8.1.190.0000.00717.28
8.1.180.0000.00718.10
8.1.170.0040.00418.41
8.1.160.0000.00718.79
8.1.150.0040.00418.62
8.1.140.0040.00417.38
8.1.130.0000.00717.72
8.1.120.0060.00317.41
8.1.110.0000.00717.39
8.1.100.0000.00717.34
8.1.90.0040.00417.39
8.1.80.0000.00717.39
8.1.70.0000.00817.27
8.1.60.0030.00617.53
8.1.50.0000.00717.34
8.1.40.0080.00017.50
8.1.30.0030.00517.56
8.1.20.0090.00017.63
8.1.10.0000.00817.50
8.1.00.0000.00717.44
8.0.300.0040.00420.03
8.0.290.0000.00817.04
8.0.280.0030.00318.41
8.0.270.0070.00017.25
8.0.260.0030.00316.85
8.0.250.0040.00416.93
8.0.240.0060.00316.88
8.0.230.0040.00416.74
8.0.220.0030.00316.84
8.0.210.0080.00016.71
8.0.200.0080.00016.84
8.0.190.0000.00716.88
8.0.180.0040.00416.77
8.0.170.0000.00816.82
8.0.160.0000.00716.85
8.0.150.0000.00716.65
8.0.140.0030.00616.75
8.0.130.0030.00313.28
8.0.120.0040.00416.78
8.0.110.0040.00416.70
8.0.100.0050.00316.67
8.0.90.0070.00016.88
8.0.80.0090.00616.75
8.0.70.0000.00716.63
8.0.60.0040.00416.80
8.0.50.0040.00416.68
8.0.30.0120.00716.99
8.0.20.0130.00617.40
8.0.10.0040.00416.73
8.0.00.0100.01116.76
7.4.330.0000.00516.85
7.4.320.0000.00616.35
7.4.300.0030.00316.35
7.4.290.0000.00716.50
7.4.280.0070.00016.32
7.4.270.0030.00316.54
7.4.260.0060.00013.09
7.4.250.0030.00316.40
7.4.240.0040.00416.44
7.4.230.0080.00016.17
7.4.220.0140.00416.55
7.4.210.0060.01116.43
7.4.200.0030.00316.22
7.4.190.0030.00316.56
7.4.160.0070.01516.35
7.4.150.0140.00417.40
7.4.140.0080.00817.86
7.4.130.0050.01216.44
7.4.120.0050.01216.56
7.4.110.0030.01316.44
7.4.100.0090.00916.42
7.4.90.0140.00316.39
7.4.80.0120.00419.39
7.4.70.0070.01016.46
7.4.60.0030.01716.53
7.4.50.0060.00316.10
7.4.40.0070.01122.77
7.4.30.0100.01416.44
7.4.00.0070.00914.83
7.3.330.0060.00013.08
7.3.320.0030.00312.97
7.3.310.0030.00316.03
7.3.300.0060.00016.03
7.3.290.0110.00316.11
7.3.280.0070.00816.16
7.3.270.0070.01517.40
7.3.260.0130.00718.24
7.3.250.0080.00816.32
7.3.240.0060.01016.52
7.3.230.0120.00316.39
7.3.210.0060.01116.26
7.3.200.0050.01119.39
7.3.190.0120.00916.20
7.3.180.0050.01016.37
7.3.170.0110.00516.50
7.3.160.0100.00716.47
7.3.120.0040.01114.75
7.3.110.0090.00714.66
7.3.100.0110.00714.90
7.3.90.0050.01114.92
7.3.80.0080.00514.75
7.3.70.0060.00814.69
7.3.60.0070.00514.68
7.3.50.0070.00814.71
7.3.40.0100.00514.77
7.3.30.0070.00714.45
7.3.20.0070.00716.57
7.3.10.0050.00916.73
7.3.00.0070.00616.33
7.2.330.0100.00716.55
7.2.320.0110.00616.63
7.2.310.0150.00916.47
7.2.300.0110.00616.30
7.2.290.0090.00616.32
7.2.250.0080.01215.04
7.2.240.0060.01115.07
7.2.230.0050.01115.03
7.2.220.0070.00714.95
7.2.210.0060.00915.01
7.2.200.0090.00714.68
7.2.190.0000.01114.85
7.2.180.0010.01214.94
7.2.170.0060.00814.79
7.2.60.0070.00416.64
7.2.00.0060.00919.09
7.1.330.0080.00815.66
7.1.320.0050.00915.77
7.1.310.0010.00915.71
7.1.300.0030.01015.77
7.1.290.0060.00915.55
7.1.280.0070.00415.67
7.1.270.0040.00915.63
7.1.260.0050.00815.87
7.1.200.0030.00915.77
7.1.100.0030.01018.10
7.1.70.0060.00317.07
7.1.60.0130.00317.18
7.1.50.0000.01016.82
7.1.40.0000.01416.55
7.1.30.0030.00916.61
7.1.20.0040.00716.61
7.1.10.0000.01016.48
7.1.00.0080.00416.64
7.0.200.0040.00416.66
7.0.190.0000.00716.49
7.0.180.0000.01116.25
7.0.170.0030.00616.20
7.0.160.0000.00816.34
7.0.150.0050.00516.20
7.0.140.0110.00016.25
7.0.130.0000.01016.21
7.0.120.0050.00516.38
7.0.110.0000.00916.32
7.0.100.0060.00316.48
7.0.90.0070.00216.20
7.0.80.0040.01216.27
7.0.70.0050.00916.20
7.0.60.0030.00816.21
7.0.50.0120.00016.21
7.0.40.0030.00816.20
7.0.30.0080.00316.20
7.0.20.0040.00816.20
7.0.10.0080.00816.20
7.0.00.0130.00016.20
5.6.300.0090.04120.84
5.6.290.0040.07020.77
5.6.280.0120.03320.91
5.6.270.0060.04120.77
5.6.260.0060.04020.95
5.6.250.0000.04520.82
5.6.240.0030.04820.75
5.6.230.0130.05220.94
5.6.220.0040.04720.78
5.6.210.0000.04620.55
5.6.200.0040.05020.91
5.6.190.0070.04020.99
5.6.180.0030.05020.83
5.6.170.0070.04620.91
5.6.160.0160.03220.72
5.6.150.0030.04620.90
5.6.140.0070.07521.00
5.6.130.0130.03920.73
5.6.120.0060.04320.67
5.6.110.0000.04720.78
5.6.100.0030.04620.71
5.6.90.0090.03820.78
5.6.80.0040.05120.25
5.6.70.0070.04620.02
5.6.60.0000.05620.36
5.6.50.0070.03920.13
5.6.40.0030.03820.09
5.6.30.0000.04820.01
5.6.20.0060.04120.23
5.6.10.0100.03820.04
5.6.00.0040.06320.00
5.5.380.0030.05017.46
5.5.370.0030.04217.41
5.5.360.0060.05217.48
5.5.350.0000.04917.52
5.5.340.0000.07018.02
5.5.330.0030.04118.00
5.5.320.0000.04417.88
5.5.310.0070.07617.91
5.5.300.0030.04717.68
5.5.290.0030.06617.82
5.5.280.0030.04318.00
5.5.270.0000.04517.92
5.5.260.0030.06617.78
5.5.250.0030.04017.61
5.5.240.0000.07717.35
5.5.230.0030.04817.09
5.5.220.0000.04317.33
5.5.210.0000.04217.33
5.5.200.0000.04217.07
5.5.190.0030.04417.35
5.5.180.0000.04617.35
5.5.160.0070.03817.34
5.5.150.0030.04317.25
5.5.140.0060.03617.27
5.5.130.0000.04517.22
5.5.120.0030.04117.25
5.5.110.0070.03617.30
5.5.100.0030.04317.24
5.5.90.0000.04117.21
5.5.80.0000.03916.93
5.5.70.0030.04517.19
5.5.60.0030.06517.16
5.5.50.0070.05716.94
5.5.40.0070.07617.24
5.5.30.0040.03917.25
5.5.20.0000.04116.91
5.5.10.0070.03617.14
5.5.00.0070.03717.14
5.4.450.0030.08619.37
5.4.440.0060.03819.30
5.4.430.0060.03519.36
5.4.420.0060.04219.24
5.4.410.0000.04419.31
5.4.400.0100.03818.85
5.4.390.0000.04419.00
5.4.380.0000.04119.00
5.4.370.0030.03818.92
5.4.360.0070.03618.93
5.4.350.0070.03319.12
5.4.340.0000.04619.00
5.4.320.0100.03319.04
5.4.310.0060.03518.87
5.4.300.0100.03918.99
5.4.290.0030.03619.00
5.4.280.0000.04118.81
5.4.270.0030.03818.84
5.4.260.0000.04218.97
5.4.250.0100.07018.87
5.4.240.0000.08818.91
5.4.230.0000.07019.05
5.4.220.0030.03919.00
5.4.210.0070.04418.99
5.4.200.0030.06618.98
5.4.190.0000.04218.79
5.4.180.0000.04218.99
5.4.170.0030.03818.82
5.4.160.0060.03518.77
5.4.150.0070.03419.12
5.4.140.0000.04216.36
5.4.130.0000.05316.53
5.4.120.0070.06516.46
5.4.110.0000.04516.40
5.4.100.0100.02916.38
5.4.90.0030.04216.39
5.4.80.0030.04516.57
5.4.70.0000.04016.36
5.4.60.0030.03516.34
5.4.50.0060.03216.32
5.4.40.0030.04016.51
5.4.30.0030.03616.31
5.4.20.0000.04716.29
5.4.10.0070.04616.56
5.4.00.0030.03316.20
5.3.290.0000.04316.20
5.3.280.0000.04116.20
5.3.270.0000.04016.20
5.3.260.0030.03816.20
5.3.250.0040.03516.20
5.3.240.0140.05416.20
5.3.230.0000.07516.20
5.3.220.0030.03416.20
5.3.210.0070.03316.20
5.3.200.0030.03716.20
5.3.190.0000.04116.20
5.3.180.0000.04016.20
5.3.170.0070.03316.20
5.3.160.0000.04116.20
5.3.150.0000.03816.20
5.3.140.0030.03516.20
5.3.130.0030.04216.20
5.3.120.0030.04016.20
5.3.110.0070.03616.20
5.3.100.0000.04016.20
5.3.90.0030.03416.20
5.3.80.0000.03716.20
5.3.70.0030.04116.20
5.3.60.0070.04116.20
5.3.50.0000.04516.20
5.3.40.0000.05316.20
5.3.30.0030.03616.20
5.3.20.0060.03216.20
5.3.10.0000.04116.20
5.3.00.0000.05616.20
5.2.170.0030.05216.20
5.2.160.0000.07016.20
5.2.150.0030.03216.20
5.2.140.0030.03116.20
5.2.130.0000.03016.20
5.2.120.0000.03016.20
5.2.110.0090.02216.20
5.2.100.0030.03316.20
5.2.90.0030.03316.20
5.2.80.0030.02816.20
5.2.70.0070.02516.20
5.2.60.0030.04716.20
5.2.50.0030.04616.20
5.2.40.0070.03016.20
5.2.30.0030.05716.20
5.2.20.0030.03116.20
5.2.10.0000.03016.20
5.2.00.0070.02316.20
5.1.60.0070.03016.20
5.1.50.0030.02416.20
5.1.40.0000.02616.20
5.1.30.0000.03716.20
5.1.20.0070.03416.20
5.1.10.0040.02616.20
5.1.00.0070.02316.20
5.0.50.0000.02216.20
5.0.40.0060.04216.20
5.0.30.0030.05016.20
5.0.20.0000.02116.20
5.0.10.0000.02916.20
5.0.00.0000.03316.20
4.4.90.0030.01516.20
4.4.80.0060.01616.20
4.4.70.0000.01616.20
4.4.60.0000.01616.20
4.4.50.0030.02016.20
4.4.40.0000.02516.20
4.4.30.0000.01716.20
4.4.20.0000.01816.20
4.4.10.0030.01616.20
4.4.00.0030.04116.20
4.3.110.0030.01316.20
4.3.100.0000.02616.20
4.3.90.0000.01616.20
4.3.80.0000.03016.20
4.3.70.0000.01716.20
4.3.60.0030.01416.20
4.3.50.0000.01716.20
4.3.40.0000.02616.20
4.3.30.0000.01716.20
4.3.20.0000.01716.20
4.3.10.0030.01416.20
4.3.00.0060.01116.20

preferences:
43.38 ms | 401 KiB | 5 Q