3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a=array( "Nike"=>"sports, clothing", "Ford"=>"cars, outdoors", "Patagonia"=>"clothing, outdoors" ); $search = 'clothing'; echo array_search("clothing",$a); // should output Nike and Patagonia $filter = array_filter($a, function($item) use ($search){ return in_array($search, explode(', ', $item)); }); print_r($filter);

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.0070.00716.75
8.3.50.0110.00716.35
8.3.40.0090.00618.57
8.3.30.0070.00718.71
8.3.20.0050.00220.29
8.3.10.0000.00723.52
8.3.00.0000.00817.66
8.2.180.0100.01018.41
8.2.170.0070.00722.96
8.2.160.0100.00320.25
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0040.00422.26
8.2.120.0040.00426.35
8.2.110.0040.00420.38
8.2.100.0040.00817.91
8.2.90.0000.00819.23
8.2.80.0060.00317.97
8.2.70.0040.00417.38
8.2.60.0040.00417.80
8.2.50.0000.00818.10
8.2.40.0030.00620.59
8.2.30.0060.00319.13
8.2.20.0040.00418.14
8.2.10.0050.00218.14
8.2.00.0000.00718.01
8.1.280.0040.01125.92
8.1.270.0070.00022.14
8.1.260.0040.00426.35
8.1.250.0000.00828.09
8.1.240.0000.00922.59
8.1.230.0060.00618.86
8.1.220.0050.00517.74
8.1.210.0040.00418.77
8.1.200.0030.00717.23
8.1.190.0040.00417.38
8.1.180.0070.00018.10
8.1.170.0040.00418.53
8.1.160.0070.00019.03
8.1.150.0030.00520.67
8.1.140.0020.00519.50
8.1.130.0000.00718.96
8.1.120.0030.00317.38
8.1.110.0040.00417.35
8.1.100.0050.00317.44
8.1.90.0040.00417.53
8.1.80.0030.00617.40
8.1.70.0030.00317.38
8.1.60.0080.00017.54
8.1.50.0030.00617.58
8.1.40.0000.00717.43
8.1.30.0040.00417.64
8.1.20.0040.00417.71
8.1.10.0030.00517.55
8.1.00.0000.00717.45
8.0.300.0000.00718.77
8.0.290.0040.00416.75
8.0.280.0000.00718.38
8.0.270.0070.00417.26
8.0.260.0030.00316.84
8.0.250.0070.00016.93
8.0.240.0030.00316.94
8.0.230.0090.00016.97
8.0.220.0000.00716.79
8.0.210.0050.00516.84
8.0.200.0030.00316.89
8.0.190.0000.00816.86
8.0.180.0070.00016.99
8.0.170.0000.00816.99
8.0.160.0030.00616.92
8.0.150.0000.00716.91
8.0.140.0040.00416.87
8.0.130.0000.00613.35
8.0.120.0000.00716.75
8.0.110.0040.00416.74
8.0.100.0040.00416.73
8.0.90.0040.00316.77
8.0.80.0030.01616.88
8.0.70.0000.00716.91
8.0.60.0040.00416.87
8.0.50.0000.00716.81
8.0.30.0110.00716.98
8.0.20.0100.00817.42
8.0.10.0080.00017.01
8.0.00.0070.01116.74
7.4.330.0000.00515.55
7.4.320.0080.00016.50
7.4.300.0000.00616.51
7.4.290.0060.00316.61
7.4.280.0000.00816.49
7.4.270.0000.00716.59
7.4.260.0000.00613.27
7.4.250.0040.00416.48
7.4.240.0000.00716.60
7.4.230.0070.00016.61
7.4.220.0060.01016.68
7.4.210.0060.00916.63
7.4.200.0030.00316.68
7.4.160.0080.01016.48
7.4.150.0090.00917.40
7.4.140.0070.01217.86
7.4.130.0110.00716.30
7.4.120.0070.01116.53
7.4.110.0070.01416.55
7.4.100.0110.01016.50
7.4.90.0090.00916.42
7.4.80.0110.01119.39
7.4.70.0040.01216.68
7.4.60.0060.01516.46
7.4.50.0080.00816.42
7.4.40.0100.00616.56
7.4.30.0040.01316.63
7.4.10.0040.01114.86
7.4.00.0070.01014.90
7.3.330.0040.00413.30
7.3.320.0000.00513.23
7.3.310.0030.00316.42
7.3.300.0030.00316.34
7.3.290.0030.01216.33
7.3.280.0090.00916.29
7.3.270.0140.00317.40
7.3.260.0090.00816.46
7.3.250.0130.00716.33
7.3.240.0060.01116.42
7.3.230.0130.00416.34
7.3.210.0040.01216.38
7.3.200.0060.00916.24
7.3.190.0080.01216.66
7.3.180.0070.01016.39
7.3.170.0050.01116.32
7.3.160.0030.01216.61
7.3.130.0060.01314.93
7.3.120.0070.00714.77
7.3.110.0000.01514.68
7.3.100.0100.00314.84
7.3.90.0060.00614.98
7.3.80.0070.01014.92
7.3.70.0100.00314.80
7.3.60.0100.00314.94
7.3.50.0120.00014.78
7.3.40.0060.00314.79
7.3.30.0060.00614.60
7.3.20.0090.00616.75
7.3.10.0040.00816.49
7.3.00.0150.00016.54
7.2.330.0150.00916.73
7.2.320.0060.01016.53
7.2.310.0070.01016.48
7.2.300.0070.01016.79
7.2.290.0040.01216.84
7.2.260.0080.00615.20
7.2.250.0070.01115.04
7.2.240.0030.01314.82
7.2.230.0090.00615.21
7.2.220.0060.00915.00
7.2.210.0030.01314.86
7.2.200.0030.01314.73
7.2.190.0110.00415.16
7.2.180.0040.01115.01
7.2.170.0070.01014.91
7.2.160.0050.00515.26
7.2.150.0000.01217.04
7.2.140.0060.00917.02
7.2.130.0090.00617.14
7.2.120.0070.00416.93
7.2.110.0070.01016.91
7.2.100.0060.00916.99
7.2.90.0070.00716.97
7.2.80.0040.01016.95
7.2.70.0060.00916.79
7.2.60.0050.01016.78
7.2.50.0030.00717.02
7.2.40.0100.00317.01
7.2.30.0120.00317.08
7.2.20.0040.01116.87
7.2.10.0080.00416.93
7.2.00.0100.00418.15
7.1.330.0110.00415.89
7.1.320.0070.00715.61
7.1.310.0000.01515.81
7.1.300.0070.00715.58
7.1.290.0060.00615.79
7.1.280.0040.01115.70
7.1.270.0000.01115.86
7.1.260.0070.00715.83
7.1.250.0080.00615.91
7.1.240.0030.00515.72
7.1.230.0080.00815.87
7.1.220.0030.01315.52
7.1.210.0070.01015.52
7.1.200.0030.01015.59
7.1.190.0040.00815.73
7.1.180.0110.00015.71
7.1.170.0030.01315.71
7.1.160.0030.00915.66
7.1.150.0060.00615.90
7.1.140.0100.00315.88
7.1.130.0100.00315.80
7.1.120.0070.01015.77
7.1.110.0120.00315.80
7.1.100.0060.00516.86
7.1.90.0100.00315.64
7.1.80.0110.00315.75
7.1.70.0600.01015.72
7.1.60.0550.01524.45
7.1.50.0620.00824.42
7.1.40.0750.01224.25
7.1.30.0670.01724.11
7.1.20.0630.00824.15
7.1.10.0620.01115.31
7.1.00.0610.01615.42
7.0.330.0060.00615.30
7.0.320.0030.00815.07
7.0.310.0070.00415.38
7.0.300.0040.00815.32
7.0.290.0030.01015.25
7.0.280.0100.00315.39
7.0.270.0000.00915.23
7.0.260.0030.00915.46
7.0.250.0030.01015.31
7.0.240.0060.00615.46
7.0.230.0080.00415.57
7.0.220.0060.00315.43
7.0.210.0110.00315.05
7.0.200.0600.01014.90
7.0.190.0600.00814.90
7.0.180.0520.00914.78
7.0.170.0590.01014.97
7.0.160.0610.00414.83
7.0.150.0480.01214.65
7.0.140.0700.00514.71
7.0.130.0440.00914.94
7.0.120.0840.00915.02
7.0.110.0710.01014.96
7.0.100.0520.01014.84
7.0.90.0630.01014.99
7.0.80.0630.00514.96
7.0.70.0470.01014.80
7.0.60.0700.01114.83
7.0.50.0780.00314.96
7.0.40.0700.00713.96
7.0.30.0680.01013.93
7.0.20.0760.00513.99
7.0.10.0720.00713.82
7.0.00.0750.00713.96
5.6.400.0090.00314.25
5.6.390.0030.01214.36
5.6.380.0070.00314.50
5.6.370.0060.00314.18
5.6.360.0050.00314.04
5.6.350.0030.00614.23
5.6.340.0040.00414.39
5.6.330.0040.00414.56
5.6.320.0090.00614.19
5.6.310.0040.01213.79
5.6.300.0080.00814.34
5.6.290.0000.01114.48
5.6.280.0030.00614.41
5.6.270.0040.01214.24
5.6.260.0070.00714.39
5.6.250.0100.00614.04
5.6.240.0000.01514.50
5.6.230.0040.00414.09
5.6.220.0070.00314.12
5.6.210.0000.01314.39
5.6.200.0000.01314.20
5.6.190.0060.00314.34
5.6.180.0060.00614.48
5.6.170.0000.01314.37
5.6.160.0090.00314.44
5.6.150.0030.01314.18
5.6.140.0120.00614.37
5.6.130.0080.00814.57
5.6.120.0000.01014.55
5.6.110.0090.00614.25
5.6.100.0060.00914.48
5.6.90.0060.00314.70
5.6.80.0070.00414.41
5.6.70.0000.01014.39
5.6.60.0070.00714.15
5.6.50.0050.00913.89
5.6.40.0030.01414.06
5.6.30.0030.00613.93
5.6.20.0060.00314.17
5.6.10.0060.00914.21
5.6.00.0040.00814.26

preferences:
40.89 ms | 401 KiB | 5 Q