3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = array(0 => 'blue', 1 => 'red', 2 => 'green', 3 => 'red'); $key = array_search('green', $array); // $key = 2; $key = array_search('blues', $array); // $key = 1; Var_dump($key);

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.70.0150.00018.30
8.3.60.0130.00316.13
8.3.50.0130.00718.04
8.3.40.0100.00618.68
8.3.30.0080.00818.41
8.3.20.0000.00721.77
8.3.10.0050.00323.66
8.3.00.0040.00419.51
8.2.190.0090.00616.75
8.2.180.0090.00620.14
8.2.170.0190.00022.96
8.2.160.0060.01220.52
8.2.150.0070.00024.18
8.2.140.0080.00024.66
8.2.130.0000.00819.39
8.2.120.0040.00426.35
8.2.110.0090.00022.09
8.2.100.0070.00417.59
8.2.90.0050.00317.78
8.2.80.0040.00418.98
8.2.70.0030.00617.80
8.2.60.0060.00317.91
8.2.50.0050.00318.10
8.2.40.0080.00022.14
8.2.30.0040.00419.28
8.2.20.0080.00018.04
8.2.10.0040.00418.18
8.2.00.0040.00418.14
8.1.280.0120.00325.92
8.1.270.0040.00422.05
8.1.260.0070.00026.35
8.1.250.0050.00228.09
8.1.240.0030.00620.69
8.1.230.0110.00022.63
8.1.220.0040.00417.79
8.1.210.0070.00318.77
8.1.200.0040.00417.23
8.1.190.0000.00817.22
8.1.180.0040.00418.10
8.1.170.0080.00018.53
8.1.160.0040.00418.80
8.1.150.0030.00320.23
8.1.140.0000.00817.66
8.1.130.0060.00019.04
8.1.120.0000.00817.33
8.1.110.0000.00817.41
8.1.100.0030.00517.35
8.1.90.0030.00617.28
8.1.80.0060.00317.27
8.1.70.0070.00017.27
8.1.60.0000.00817.39
8.1.50.0020.00517.34
8.1.40.0080.00417.34
8.1.30.0000.00817.46
8.1.20.0000.00817.55
8.1.10.0070.00017.48
8.1.00.0000.00817.36
8.0.300.0080.00021.96
8.0.290.0050.00216.63
8.0.280.0000.00918.35
8.0.270.0050.00317.19
8.0.260.0000.00616.65
8.0.250.0030.00316.88
8.0.240.0000.00716.85
8.0.230.0000.00716.87
8.0.220.0000.00816.65
8.0.210.0030.00316.68
8.0.200.0040.00416.78
8.0.190.0030.00316.91
8.0.180.0030.00316.79
8.0.170.0050.00516.82
8.0.160.0000.00716.89
8.0.150.0040.00416.72
8.0.140.0040.00416.66
8.0.130.0000.00513.25
8.0.120.0070.00016.78
8.0.110.0000.00716.81
8.0.100.0000.00716.64
8.0.90.0040.00416.70
8.0.80.0150.00016.77
8.0.70.0050.00216.61
8.0.60.0000.00716.80
8.0.50.0000.00716.79
8.0.30.0150.00616.94
8.0.20.0090.01017.40
8.0.10.0000.00716.92
8.0.00.0080.01216.61
7.4.330.0000.00515.55
7.4.320.0060.00016.32
7.4.300.0000.00616.43
7.4.290.0040.00216.52
7.4.280.0050.00316.51
7.4.270.0040.00216.37
7.4.260.0000.00816.41
7.4.250.0030.00516.38
7.4.240.0040.00316.50
7.4.230.0020.00516.43
7.4.220.0000.00716.30
7.4.210.0100.00516.46
7.4.200.0030.00316.52
7.4.160.0140.00516.48
7.4.150.0090.00917.40
7.4.140.0120.00417.86
7.4.130.0150.00716.36
7.4.120.0110.00816.39
7.4.110.0070.01016.39
7.4.100.0130.00316.36
7.4.90.0120.01316.37
7.4.80.0110.01019.39
7.4.70.0100.00816.49
7.4.60.0090.00916.43
7.4.50.0070.00716.48
7.4.40.0030.01316.42
7.4.00.0100.00714.94
7.3.330.0020.00212.96
7.3.320.0000.00612.96
7.3.310.0000.00716.25
7.3.300.0030.00316.19
7.3.290.0030.00316.17
7.3.280.0080.00616.10
7.3.270.0080.00917.40
7.3.260.0120.00616.14
7.3.240.0100.00616.29
7.3.230.0000.01616.16
7.3.210.0130.00416.21
7.3.200.0170.00016.33
7.3.190.0090.01216.23
7.3.180.0090.00616.52
7.3.170.0070.01016.33
7.3.160.0150.00016.11
7.3.120.0070.01015.28
7.3.110.0090.00615.28
7.3.100.0070.01015.28
7.3.90.0100.00715.28
7.3.80.0130.00315.28
7.3.70.0080.00415.28
7.3.60.0070.00715.28
7.3.50.0040.01215.28
7.3.40.0040.00715.28
7.3.30.0040.00815.28
7.3.20.0080.00816.45
7.3.10.0040.01116.42
7.3.00.0080.00516.54
7.2.330.0070.01016.60
7.2.320.0090.00816.20
7.2.310.0090.00916.31
7.2.300.0070.01616.54
7.2.290.0120.00616.61
7.2.250.0090.00915.28
7.2.240.0090.00915.28
7.2.230.0070.00315.28
7.2.220.0060.00915.28
7.2.210.0090.00615.28
7.2.200.0060.00915.28
7.2.190.0070.01015.28
7.2.180.0030.00915.28
7.2.170.0040.01115.28
7.2.110.0040.01116.30
7.2.60.0060.00916.68
7.2.20.0090.01019.67
7.2.10.0050.01619.79
7.2.00.0100.00919.75
7.1.330.0000.01315.44
7.1.320.0000.01115.81
7.1.310.0150.00015.72
7.1.300.0110.00015.54
7.1.290.0090.00015.75
7.1.280.0000.01215.79
7.1.270.0070.00715.66
7.1.260.0030.00815.59
7.1.200.0080.00815.66
7.1.140.0080.01318.61
7.1.130.0060.01918.70
7.1.120.0060.01118.76
7.1.110.0100.01117.88
7.1.100.0080.01017.76
7.1.90.0060.01618.16
7.1.80.0090.01218.17
7.1.70.0100.01217.06
7.1.60.0290.01934.69
7.1.50.0240.01234.86
7.1.40.0280.01734.08
7.1.30.0240.01434.42
7.1.20.0280.01534.68
7.1.10.0060.01116.76
7.1.00.0040.01216.66

preferences:
57.71 ms | 401 KiB | 5 Q