3v4l.org

run code in 500+ PHP versions simultaneously
<?php $array = [ [ 'lang' => 'de', 'value' => "text_1_en_Text i need", 'id' => 2365 ], [ 'lang' => 'en', 'value' => "something i dont need", 'id' => 2365 ] ]; $needle = 'text_1_en_'; var_export( array_filter( $array, fn($row) => str_starts_with($row['value'], $needle) ) ); echo "\n---\n"; $result = []; foreach ($array as $row) { if (str_starts_with($row['value'], $needle)) { $result = $row; break; } } var_export($result);

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.70.0050.00316.80
8.5.60.0140.00616.69
8.5.50.0070.00118.33
8.5.30.0080.01020.27
8.5.20.0100.00920.16
8.5.10.0100.00818.77
8.5.00.0130.01119.83
8.4.210.0100.00719.42
8.4.180.0110.01025.75
8.4.170.0130.00921.87
8.4.160.0050.00721.53
8.4.150.0070.00516.87
8.4.140.0130.00817.57
8.4.130.0120.00617.49
8.4.120.0110.00824.34
8.4.110.0110.00622.49
8.4.100.0120.00817.92
8.4.90.0120.00722.50
8.4.80.0030.00617.81
8.4.70.0040.00417.83
8.4.60.0090.01317.91
8.4.50.0110.00920.49
8.4.40.0070.01122.32
8.4.30.0100.01020.45
8.4.20.0080.00317.91
8.4.10.0100.01022.16
8.3.300.0100.01122.74
8.3.290.0100.01120.81
8.3.280.0090.01118.48
8.3.270.0120.00716.52
8.3.260.0110.00816.57
8.3.250.0090.01018.90
8.3.240.0110.00717.12
8.3.230.0070.01216.45
8.3.220.0070.00716.98
8.3.210.0070.00718.53
8.3.200.0080.00716.63
8.3.190.0130.00718.09
8.3.180.0120.00616.63
8.3.170.0120.00616.54
8.3.160.0110.00718.52
8.3.150.0100.01017.20
8.3.140.0070.00016.22
8.3.130.0080.00818.34
8.3.120.0050.00518.80
8.3.110.0100.00720.94
8.3.100.0040.00416.52
8.3.90.0060.00926.77
8.3.80.0060.00316.50
8.3.70.0180.00318.18
8.3.60.0140.00016.38
8.3.50.0070.01020.34
8.3.40.0070.00718.72
8.3.30.0080.00619.34
8.3.20.0040.00424.18
8.3.10.0080.00024.66
8.3.00.0000.00726.16
8.2.300.0120.00922.27
8.2.290.0050.00420.41
8.2.280.0110.00716.49
8.2.270.0160.00316.57
8.2.260.0110.00718.82
8.2.250.0130.00316.60
8.2.240.0120.00617.02
8.2.230.0090.00022.58
8.2.220.0080.00024.06
8.2.210.0200.00026.77
8.2.200.0070.00316.75
8.2.190.0070.00716.63
8.2.180.0090.00625.92
8.2.170.0100.00618.77
8.2.160.0090.00622.96
8.2.150.0040.00425.66
8.2.140.0000.00824.66
8.2.130.0000.00726.16
8.2.120.0030.00526.16
8.2.110.0030.00722.25
8.2.100.0120.00018.98
8.2.90.0050.00317.75
8.2.80.0030.00518.95
8.2.70.0060.00317.63
8.2.60.0000.00717.63
8.2.50.0080.00017.98
8.2.40.0030.00618.34
8.2.30.0080.00018.19
8.2.20.0000.00720.31
8.2.10.0020.00518.08
8.2.00.0000.00719.37
8.1.340.0130.00717.68
8.1.330.0130.00621.95
8.1.320.0120.00716.06
8.1.310.0090.00916.88
8.1.300.0090.00620.22
8.1.290.0000.01130.84
8.1.280.0100.00725.92
8.1.270.0070.00023.99
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0070.00323.96
8.1.230.0000.01218.97
8.1.220.0000.00817.79
8.1.210.0050.00318.77
8.1.200.0030.00617.35
8.1.190.0040.00417.22
8.1.180.0040.00418.10
8.1.170.0040.00417.62
8.1.160.0040.00418.79
8.1.150.0030.00718.65
8.1.140.0040.00417.38
8.1.130.0000.00717.52
8.1.120.0000.00717.46
8.1.110.0040.00417.44
8.1.100.0040.00417.35
8.1.90.0040.00417.34
8.1.80.0030.00717.50
8.1.70.0030.00617.32
8.1.60.0030.00517.47
8.1.50.0150.00817.50
8.1.40.0130.00617.38
8.1.30.0180.00017.58
8.1.20.0090.00917.59
8.1.10.0200.00417.51
8.1.00.0140.00617.46
8.0.300.0050.00219.64
8.0.290.0040.00416.63
8.0.280.0000.00718.50
8.0.270.0050.00216.89
8.0.260.0030.00316.83
8.0.250.0070.00016.87
8.0.240.0050.00316.84
8.0.230.0070.00316.97
8.0.220.0000.00816.90
8.0.210.0000.00716.78
8.0.200.0030.00316.96
8.0.190.0070.00016.85
8.0.180.0160.00416.80
8.0.170.0130.00616.89
8.0.160.0140.00516.71
8.0.150.0140.00516.84
8.0.140.0070.01416.73
8.0.130.0140.00516.77
8.0.120.0120.00816.91
8.0.110.0180.00016.95
8.0.100.0110.00516.73
8.0.90.0120.00416.89
8.0.80.0150.00516.89
8.0.70.0090.00916.66
8.0.60.0170.00016.79
8.0.50.0120.00816.86
8.0.30.0130.00416.90
8.0.20.0160.00316.77
8.0.10.0110.00616.82
7.4.330.0030.00315.55
7.4.320.0030.00316.52
7.4.300.0060.00016.54
7.4.290.0160.00416.63
7.4.280.0120.00616.53
7.4.270.0050.00916.58
7.4.260.0090.00416.36
7.4.250.0130.00416.47
7.4.240.0150.00416.43
7.4.230.0090.00016.55
7.4.220.0050.00516.50
7.4.210.0100.00716.59
7.4.200.0180.00416.48
7.4.190.0150.00416.41
7.4.180.0160.00416.54
7.4.160.0070.01116.56
7.4.150.0150.00016.55
7.4.140.0180.00316.44
7.4.130.0170.00316.57
7.4.120.0100.01016.34
7.4.110.0110.00716.43
7.4.100.0070.00716.59
7.4.90.0110.00616.33
7.4.80.0100.00716.38
7.4.70.0160.00316.52
7.4.60.0170.00016.47
7.4.50.0180.00016.43
7.4.40.0110.00416.41
7.4.30.0140.00616.34
7.4.20.0030.00816.45
7.4.10.0070.00416.42
7.4.00.0140.00016.45

preferences:
55.12 ms | 1284 KiB | 5 Q