3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = [ 'needle' => 'needle in haystack text', 'Need' => 'another needle', 'fine' => 'refined', 'found' => 'Foundation', '' => 'non-empty haystack', 'missing' => 'not here', 'This is 0 in a haystack!', ]; var_export( array_filter( $array, function($haystack, $needle) { return strpos($haystack, $needle) !== false; }, ARRAY_FILTER_USE_BOTH ) );

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.5.00.0120.00819.69
8.4.150.0020.00014.05
8.4.140.0140.00717.59
8.4.130.0120.00817.96
8.4.120.0130.00620.37
8.4.110.0130.00722.25
8.4.100.0140.00717.73
8.4.90.0060.00318.70
8.4.80.0130.00517.77
8.4.70.0040.00717.57
8.4.60.0050.00520.51
8.4.50.0110.00917.70
8.4.40.0000.00917.74
8.4.30.0040.00420.30
8.4.20.0100.00017.54
8.4.10.0160.00319.29
8.3.280.0110.00918.32
8.3.270.0120.00816.29
8.3.260.0100.00716.55
8.3.250.0160.00318.73
8.3.240.0080.01016.41
8.3.230.0150.00416.56
8.3.220.0090.00517.25
8.3.210.0100.00416.40
8.3.200.0130.00716.55
8.3.190.0080.00717.20
8.3.180.0130.00616.37
8.3.170.0100.00618.83
8.3.160.0040.01116.21
8.3.150.0060.01217.38
8.3.140.0000.00818.80
8.3.130.0000.00818.29
8.3.120.0040.00418.93
8.3.110.0040.01120.94
8.3.100.0060.00316.50
8.3.90.0080.00026.77
8.3.80.0000.01216.38
8.3.70.0150.00416.58
8.3.60.0120.00918.41
8.3.50.0120.00320.11
8.3.40.0070.01320.09
8.3.30.0060.00918.51
8.3.20.0080.00024.18
8.3.10.0090.00924.66
8.3.00.0070.00026.16
8.2.290.0120.00620.39
8.2.280.0070.00818.14
8.2.270.0120.00316.89
8.2.260.0070.01116.21
8.2.250.0000.00816.52
8.2.240.0150.00317.14
8.2.230.0060.00322.58
8.2.220.0080.01124.06
8.2.210.0040.00426.77
8.2.200.0100.00016.47
8.2.190.0130.00716.58
8.2.180.0090.00625.92
8.2.170.0100.00718.79
8.2.160.0130.00022.96
8.2.150.0020.00525.66
8.2.140.0070.00024.66
8.2.130.0040.00426.16
8.2.120.0040.00426.16
8.2.110.0070.00422.20
8.2.100.0080.00417.84
8.2.90.0050.00318.88
8.2.80.0000.00917.97
8.2.70.0060.00317.63
8.2.60.0000.00818.04
8.2.50.0090.00018.07
8.2.40.0000.00820.00
8.2.30.0070.00017.99
8.2.20.0000.00820.38
8.2.10.0070.00017.64
8.2.00.0070.00019.38
8.1.330.0050.00421.91
8.1.320.0100.00916.00
8.1.310.0110.00715.81
8.1.300.0030.00617.88
8.1.290.0090.00330.84
8.1.280.0070.00725.92
8.1.270.0000.00723.99
8.1.260.0000.00826.35
8.1.250.0040.00428.09
8.1.240.0030.00620.83
8.1.230.0040.00820.85
8.1.220.0060.00317.77
8.1.210.0000.00818.77
8.1.200.0060.00317.36
8.1.190.0080.00017.35
8.1.180.0060.00318.10
8.1.170.0060.00318.59
8.1.160.0040.00418.85
8.1.150.0040.00418.61
8.1.140.0040.00417.37
8.1.130.0030.00618.89
8.1.120.0050.00217.36
8.1.110.0030.00717.36
8.1.100.0000.00717.45
8.1.90.0000.00817.35
8.1.80.0060.00317.36
8.1.70.0000.00817.46
8.1.60.0050.00317.59
8.1.50.0060.00317.40
8.1.40.0080.00017.41
8.1.30.0000.00817.59
8.1.20.0180.00017.71
8.1.10.0200.00617.45
8.1.00.0190.00817.32
8.0.300.0040.00418.77
8.0.290.0040.00416.63
8.0.280.0060.00320.28
8.0.270.0050.00219.74
8.0.260.0030.00318.33
8.0.250.0030.00316.80
8.0.240.0030.00516.82
8.0.230.0080.00016.90
8.0.220.0070.00016.73
8.0.210.0030.00416.84
8.0.200.0030.00316.95
8.0.190.0030.00716.86
8.0.180.0030.00316.94
8.0.170.0040.00416.90
8.0.160.0000.00716.86
8.0.150.0080.00416.84
8.0.140.0120.00716.75
8.0.130.0190.00016.91
8.0.120.0180.00316.84
8.0.110.0160.00416.93
8.0.100.0130.00716.90
8.0.90.0160.00316.86
8.0.80.0160.00416.82
8.0.70.0190.00416.75
8.0.60.0170.00316.86
8.0.50.0190.00316.89
8.0.30.0120.00816.75
8.0.20.0160.00316.87
8.0.10.0140.00716.94
7.4.330.0060.00920.49
7.4.320.0030.00316.50
7.4.300.0030.00316.61
7.4.290.0000.00816.47
7.4.280.0040.00416.48
7.4.270.0060.01116.50
7.4.260.0140.00316.48
7.4.250.0150.00416.50
7.4.240.0170.00716.52
7.4.230.0130.00316.49
7.4.220.0140.00316.62
7.4.210.0100.00316.38
7.4.200.0050.01116.58
7.4.190.0120.00616.52
7.4.180.0140.00216.57
7.4.160.0150.00516.43
7.4.150.0160.00416.50
7.4.140.0100.00816.48
7.4.130.0050.01016.38
7.4.120.0120.00416.27
7.4.110.0200.00016.39
7.4.100.0160.00316.50
7.4.90.0140.00716.32
7.4.80.0090.00916.31
7.4.70.0130.00316.31
7.4.60.0170.00316.38
7.4.50.0150.00416.32
7.4.40.0120.00916.36
7.4.30.0160.00316.36
7.4.20.0140.00316.39
7.4.10.0150.00416.38
7.4.00.0140.00716.52

preferences:
35.05 ms | 403 KiB | 5 Q