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('blue', $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.60.0130.00616.75
8.3.50.0090.00917.91
8.3.40.0060.01018.46
8.3.30.0120.00618.47
8.3.20.0080.00021.79
8.3.10.0050.00323.61
8.3.00.0050.00319.56
8.2.180.0040.01120.02
8.2.170.0070.00722.96
8.2.160.0110.00820.52
8.2.150.0050.00324.18
8.2.140.0000.00824.66
8.2.130.0000.00721.02
8.2.120.0070.00026.35
8.2.110.0050.00519.39
8.2.100.0040.00817.66
8.2.90.0040.00417.63
8.2.80.0040.00718.41
8.2.70.0030.00917.80
8.2.60.0000.00917.93
8.2.50.0040.00418.10
8.2.40.0030.00522.32
8.2.30.0030.00519.13
8.2.20.0050.00217.98
8.2.10.0000.00817.92
8.2.00.0070.00317.91
8.1.280.0080.00625.92
8.1.270.0040.00422.20
8.1.260.0000.00726.35
8.1.250.0050.00228.09
8.1.240.0000.00819.45
8.1.230.0090.00317.70
8.1.220.0000.00817.74
8.1.210.0000.00818.77
8.1.200.0000.00817.22
8.1.190.0040.00417.22
8.1.180.0040.00418.10
8.1.170.0030.00618.59
8.1.160.0050.00318.87
8.1.150.0000.00720.16
8.1.140.0000.00917.68
8.1.130.0000.00719.05
8.1.120.0030.00317.44
8.1.110.0000.00817.43
8.1.100.0000.00717.36
8.1.90.0090.00017.44
8.1.80.0060.00317.27
8.1.70.0040.00417.39
8.1.60.0040.00417.57
8.1.50.0000.00817.47
8.1.40.0000.01217.41
8.1.30.0000.00817.56
8.1.20.0040.00417.42
8.1.10.0070.00017.41
8.1.00.0030.00617.25
8.0.300.0000.00718.77
8.0.290.0000.00816.75
8.0.280.0070.00018.41
8.0.270.0000.00717.11
8.0.260.0030.00316.62
8.0.250.0000.00716.78
8.0.240.0050.00316.91
8.0.230.0070.00016.92
8.0.220.0000.01016.71
8.0.210.0030.00316.85
8.0.200.0060.00016.70
8.0.190.0030.00516.71
8.0.180.0040.00416.87
8.0.170.0050.00316.82
8.0.160.0030.00516.77
8.0.150.0040.00416.77
8.0.140.0040.00416.66
8.0.130.0000.00613.32
8.0.120.0050.00216.75
8.0.110.0000.00716.75
8.0.100.0000.00716.84
8.0.90.0070.00016.61
8.0.80.0090.00616.70
8.0.70.0040.00416.75
8.0.60.0050.00216.69
8.0.50.0040.00416.84
8.0.30.0070.01117.02
8.0.20.0130.00717.40
8.0.10.0040.00416.75
8.0.00.0130.00616.64
7.4.330.0000.00615.55
7.4.320.0060.00016.57
7.4.300.0000.00616.41
7.4.290.0070.00016.52
7.4.280.0000.00816.51
7.4.270.0030.00316.48
7.4.260.0020.00516.44
7.4.250.0050.00316.28
7.4.240.0040.00416.50
7.4.230.0000.00716.41
7.4.220.0000.00816.54
7.4.210.0050.01216.47
7.4.200.0000.00716.45
7.4.160.0100.01016.31
7.4.150.0200.00317.40
7.4.140.0110.00617.86
7.4.130.0110.00916.23
7.4.120.0100.00916.36
7.4.110.0140.00616.22
7.4.100.0060.01516.16
7.4.90.0060.01116.47
7.4.80.0160.00319.39
7.4.70.0090.00916.52
7.4.60.0100.00716.24
7.4.50.0040.01416.44
7.4.40.0120.00616.43
7.4.00.0090.00614.56
7.3.330.0000.00513.03
7.3.320.0030.00313.11
7.3.310.0040.00416.21
7.3.300.0030.00316.16
7.3.290.0000.00616.11
7.3.280.0040.01216.11
7.3.270.0060.01117.40
7.3.260.0130.01516.29
7.3.240.0100.00716.16
7.3.230.0130.01016.30
7.3.210.0100.00716.23
7.3.200.0060.01316.21
7.3.190.0130.00316.43
7.3.180.0060.00916.45
7.3.170.0070.01316.41
7.3.160.0060.00916.34
7.3.10.0080.00416.56
7.3.00.0000.01316.54
7.2.330.0130.00316.63
7.2.320.0090.00916.56
7.2.310.0120.00916.61
7.2.300.0130.00616.36
7.2.290.0120.00616.55
7.2.130.0040.00416.93
7.2.120.0030.01116.78
7.2.110.0040.01116.91
7.2.100.0070.01016.73
7.2.90.0030.00916.70
7.2.80.0060.00317.03
7.2.70.0070.00416.82
7.2.60.0030.00516.70
7.2.50.0040.01116.57
7.2.40.0040.01116.38
7.2.30.0040.01116.90
7.2.20.0090.00518.21
7.2.10.0070.01018.16
7.2.00.0040.01118.25
7.1.250.0030.00615.71
7.1.200.0050.00515.74
7.1.140.0060.01018.42
7.1.130.0070.00818.39
7.1.120.0040.01218.42
7.1.110.0110.00917.76
7.1.100.0100.00718.16
7.1.90.0080.00917.74
7.1.80.0070.01317.83
7.1.70.0050.01417.07
7.1.60.0200.01434.89
7.1.50.0260.02034.67
7.1.40.0220.01834.25
7.1.30.0190.01534.42
7.1.20.0280.02034.55
7.1.10.0070.00816.68
7.1.00.0070.00816.73

preferences:
60.09 ms | 400 KiB | 5 Q