3v4l.org

run code in 300+ PHP versions simultaneously
<?php $search = 'pink'; $test = array( 'name_01' => array('yellow', 'red', 'blue', 'black', 'white', 'purple'), 'name_02' => array('red', 'blue', 'white', 'green'), 'name_03' => array('blue', 'pink', 'purple', 'blue'), 'name_04' => array('white', 'black', 'red'), 'name_05' => array('yellow', 'white', 'pink', 'black') ); $keys = []; foreach($test as $key=>$arr){ if(in_array($search,$arr)){ $keys[] = $key; } } print_r($keys);

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.4.120.0110.01022.45
8.4.110.0090.00822.39
8.4.100.0100.00917.54
8.4.90.0120.01122.37
8.4.80.0150.00418.74
8.4.70.0030.00618.76
8.4.60.0060.00620.54
8.4.50.0130.00717.54
8.4.40.0160.00317.39
8.4.30.0090.01020.21
8.4.20.0030.00618.11
8.4.10.0100.01019.62
8.3.250.0080.00919.00
8.3.240.0110.00816.84
8.3.230.0050.00316.84
8.3.220.0130.00518.77
8.3.210.0050.00318.41
8.3.200.0030.00616.61
8.3.190.0040.00417.10
8.3.180.0110.00816.55
8.3.170.0070.01119.21
8.3.160.0000.01816.80
8.3.150.0120.00818.98
8.3.140.0000.00816.54
8.3.130.0070.00418.55
8.3.120.0090.01218.90
8.3.110.0050.00520.94
8.3.100.0040.00424.06
8.3.90.0090.00926.77
8.3.80.0030.00616.88
8.3.70.0180.00016.58
8.3.60.0090.00916.50
8.3.50.0030.01018.08
8.3.40.0140.00321.89
8.3.30.0150.00318.59
8.3.20.0080.00024.18
8.3.10.0020.00524.66
8.3.00.0050.00326.16
8.2.290.0070.00120.21
8.2.280.0090.01018.27
8.2.270.0100.00718.91
8.2.260.0050.00319.05
8.2.250.0090.00016.51
8.2.240.0080.00017.18
8.2.230.0060.00322.58
8.2.220.0000.00837.54
8.2.210.0040.01126.77
8.2.200.0030.00616.63
8.2.190.0070.01416.75
8.2.180.0070.01125.92
8.2.170.0120.00318.96
8.2.160.0100.00322.96
8.2.150.0000.00725.66
8.2.140.0000.00824.66
8.2.130.0070.00026.16
8.2.120.0000.00819.95
8.2.110.0040.00419.26
8.2.100.0110.00018.05
8.2.90.0040.00419.35
8.2.80.0040.00417.97
8.2.70.0040.00417.75
8.2.60.0070.00417.43
8.2.50.0040.00418.07
8.2.40.0040.00419.76
8.2.30.0040.00418.04
8.2.20.0000.00720.31
8.2.10.0070.00017.66
8.2.00.0030.00519.36
8.1.330.0070.00823.75
8.1.320.0110.00916.11
8.1.310.0050.00316.72
8.1.300.0030.00617.82
8.1.290.0060.00318.88
8.1.280.0090.00625.92
8.1.270.0050.00323.99
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0060.00322.61
8.1.230.0060.00617.78
8.1.220.0040.00417.74
8.1.210.0090.00018.77
8.1.200.0060.00317.35
8.1.190.0090.00017.35
8.1.180.0000.00818.10
8.1.170.0000.00818.71
8.1.160.0070.00418.81
8.1.150.0050.00218.65
8.1.140.0040.00417.46
8.1.130.0030.00318.95
8.1.120.0040.00417.37
8.1.110.0040.00417.45
8.1.100.0040.00417.52
8.1.90.0000.00817.47
8.1.80.0070.00317.41
8.1.70.0000.00717.48
8.1.60.0000.00917.55
8.1.50.0030.00517.57
8.1.40.0030.00617.48
8.1.30.0070.00317.62
8.1.20.0020.00517.70
8.1.10.0200.00717.41
8.1.00.0200.00317.36
8.0.300.0000.00718.77
8.0.290.0060.00316.75
8.0.280.0030.00318.49
8.0.270.0000.00916.82
8.0.260.0000.00618.40
8.0.250.0000.00716.95
8.0.240.0000.00616.91
8.0.230.0040.00416.96
8.0.220.0030.00316.86
8.0.210.0050.00316.92
8.0.200.0000.00817.02
8.0.190.0040.00416.92
8.0.180.0030.00516.88
8.0.170.0030.00616.83
8.0.160.0040.00416.96
8.0.150.0000.00716.80
8.0.140.0150.00516.80
8.0.130.0140.00616.86
8.0.120.0090.01016.76
8.0.110.0120.00816.87
8.0.100.0100.01016.71
8.0.90.0150.00516.89
8.0.80.0050.01516.83
8.0.70.0170.00316.83
8.0.60.0120.00816.87
8.0.50.0140.00616.87
8.0.30.0190.00316.78
8.0.20.0130.00616.80
8.0.10.0160.00316.87
8.0.00.0110.00017.01
7.4.330.0000.00515.55
7.4.320.0050.00216.53
7.4.300.0000.00616.59
7.4.290.0000.01016.56
7.4.280.0050.00316.59
7.4.270.0200.00016.34
7.4.260.0220.00016.45
7.4.250.0170.00416.45
7.4.240.0240.00016.48
7.4.230.0180.00416.54
7.4.220.0140.00516.43
7.4.210.0090.00916.54
7.4.200.0110.00816.52
7.4.190.0150.00416.55
7.4.180.0140.00516.50
7.4.160.0210.00016.41
7.4.150.0160.00516.36
7.4.140.0150.00416.47
7.4.130.0160.00316.39
7.4.120.0160.00316.39
7.4.110.0050.01416.50
7.4.100.0190.00016.49
7.4.90.0070.01116.25
7.4.80.0110.00816.44
7.4.70.0140.00516.39
7.4.60.0160.00316.30
7.4.50.0180.00216.34
7.4.40.0130.00516.39
7.4.30.0190.00016.43
7.4.20.0160.00316.38
7.4.10.0150.00416.50
7.4.00.0100.01016.48
7.3.330.0140.00716.32
7.3.320.0210.00016.26
7.3.310.0160.00316.32
7.3.300.0130.00616.06
7.3.290.0180.00016.18
7.3.280.0180.00316.09
7.3.270.0200.00016.16
7.3.260.0150.00616.25
7.3.250.0170.00316.11
7.3.240.0210.00016.36
7.3.230.0170.00316.11
7.3.220.0120.00616.24
7.3.210.0180.00316.11
7.3.200.0220.00015.99
7.3.190.0170.00416.20
7.3.180.0140.00516.02
7.3.170.0180.00316.04
7.3.160.0190.00016.09
7.3.150.0130.00616.18
7.3.140.0180.00316.19
7.3.130.0240.00016.25

preferences:
28.35 ms | 403 KiB | 5 Q