3v4l.org

run code in 300+ PHP versions simultaneously
<?php $paradasarray = [ (object)['localidad' => 'Estepona whatever'], (object)['localidad' => 'something Benalmádena'], (object)['localidad' => 'Benalmádena foo'], (object)['localidad' => 'Estepona bar'] ]; $result = []; foreach ($paradasarray as $i => $parada) { echo "iteration #$i\n"; if (strpos($parada->localidad, 'Benalmádena') !== false) { $result['Benalmádena'] = "Benalmádena Costa"; } elseif (strpos($parada->localidad, 'Estepona') !== false) { $result['Estepona'] = 'Estepona'; } if (count($result) == 2) { break; } } // you don't need to declare a value attribute if it matches the text echo "<select>\n"; echo "\t<option>" , implode("</option>\n\t<option>", $result) , "</option>\n"; echo "</select>";

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.0110.01020.32
8.4.150.0020.00014.05
8.4.140.0130.00817.84
8.4.130.0120.00517.80
8.4.120.0120.00820.74
8.4.110.0130.00722.28
8.4.100.0140.00617.95
8.4.90.0050.00417.61
8.4.80.0040.00619.56
8.4.70.0090.00817.82
8.4.60.0140.00719.13
8.4.50.0110.00918.68
8.4.40.0140.00719.63
8.4.30.0130.00617.89
8.4.20.0070.01320.52
8.4.10.0030.00617.47
8.3.280.0170.00618.44
8.3.270.0150.01216.61
8.3.260.0130.00716.83
8.3.250.0070.00718.66
8.3.240.0150.00416.80
8.3.230.0110.00816.66
8.3.220.0050.00316.52
8.3.210.0090.00716.55
8.3.200.0050.00516.68
8.3.190.0100.01117.18
8.3.180.0120.00619.11
8.3.170.0040.00416.63
8.3.160.0040.01216.85
8.3.150.0160.00318.73
8.3.140.0060.01019.02
8.3.130.0030.00618.65
8.3.120.0110.00820.67
8.3.110.0090.00320.94
8.3.100.0120.00624.06
8.3.90.0120.00626.77
8.3.80.0000.01018.43
8.3.70.0120.00318.43
8.3.60.0100.00718.56
8.3.50.0070.01118.11
8.3.40.0150.00618.92
8.3.30.0110.00418.64
8.3.20.0070.00019.29
8.3.10.0000.00721.82
8.3.00.0040.00422.39
8.2.290.0090.01020.33
8.2.280.0090.01018.56
8.2.270.0110.00816.76
8.2.260.0150.00316.59
8.2.250.0040.00416.61
8.2.240.0000.00817.29
8.2.230.0100.01022.58
8.2.220.0060.00337.54
8.2.210.0090.00926.77
8.2.200.0060.00318.41
8.2.190.0100.00616.75
8.2.180.0120.00918.27
8.2.170.0070.01419.04
8.2.160.0070.00722.96
8.2.150.0050.00324.18
8.2.140.0040.00424.66
8.2.130.0080.00019.95
8.2.120.0050.00226.35
8.2.110.0030.00719.32
8.2.100.0090.00319.77
8.2.90.0030.00717.88
8.2.80.0050.00317.97
8.2.70.0000.00818.03
8.2.60.0000.00818.16
8.2.50.0000.00818.10
8.2.40.0000.00819.46
8.2.30.0030.00519.30
8.2.20.0000.00718.13
8.2.10.0000.00717.98
8.2.00.0080.00017.65
8.1.330.0110.00618.11
8.1.320.0130.00817.92
8.1.310.0000.00818.08
8.1.300.0030.00616.25
8.1.290.0090.00018.88
8.1.280.0030.01225.92
8.1.270.0080.00023.85
8.1.260.0060.00326.35
8.1.250.0080.00028.09
8.1.240.0070.00319.44
8.1.230.0040.00720.87
8.1.220.0040.00417.74
8.1.210.0040.00418.77
8.1.200.0090.00317.36
8.1.190.0050.00317.35
8.1.180.0000.00918.10
8.1.170.0050.00318.53
8.1.160.0030.00618.85
8.1.150.0050.00218.89
8.1.140.0030.00322.07
8.1.130.0070.00022.06
8.1.120.0070.00017.36
8.1.110.0030.00617.49
8.1.100.0040.00417.50
8.1.90.0070.00017.44
8.1.80.0100.00017.38
8.1.70.0030.00717.43
8.1.60.0030.00517.46
8.1.50.0000.00717.53
8.1.40.0040.00417.51
8.1.30.0000.00717.65
8.1.20.0050.00317.54
8.1.10.0040.00417.46
8.1.00.0000.00817.50
8.0.300.0070.00018.77
8.0.290.0000.00816.75
8.0.280.0030.00318.43
8.0.270.0030.00317.32
8.0.260.0030.00318.34
8.0.250.0030.00316.93
8.0.240.0050.00316.98
8.0.230.0050.00217.05
8.0.220.0000.00916.91
8.0.210.0030.00317.02
8.0.200.0000.00716.92
8.0.190.0030.00616.96
8.0.180.0040.00416.98
8.0.170.0060.00316.88
8.0.160.0060.00317.01
8.0.150.0080.00416.90
8.0.140.0000.00816.90
8.0.130.0050.00013.34
8.0.120.0030.00616.90
8.0.110.0040.00417.07
8.0.100.0040.00417.01
8.0.90.0080.00017.00
8.0.80.0080.00816.95
8.0.70.0050.00216.84
8.0.60.0050.00316.84
8.0.50.0000.00816.90
8.0.30.0040.01217.08
8.0.20.0090.00917.40
8.0.10.0040.00417.07
8.0.00.0140.00616.85
7.4.330.0000.00515.55
7.4.320.0030.00316.36
7.4.300.0030.00316.51
7.4.290.0070.00016.66
7.4.280.0040.00416.53
7.4.270.0000.00816.50
7.4.260.0000.00716.50
7.4.250.0070.00216.53
7.4.240.0000.00716.56
7.4.230.0000.00716.40
7.4.220.0030.00616.71
7.4.210.0080.00716.64
7.4.200.0000.00716.60
7.4.160.0070.00816.44
7.4.140.0100.01117.86
7.4.130.0000.01716.66
7.4.120.0080.01116.53
7.4.110.0130.01016.57
7.4.100.0150.00316.61
7.4.90.0150.00516.54
7.4.80.0140.00719.39
7.4.70.0070.01516.60
7.4.60.0080.00816.42
7.4.50.0040.01416.44
7.4.40.0120.00316.55
7.4.00.0100.00714.66
7.3.330.0050.00013.14
7.3.320.0000.00613.37
7.3.310.0000.00916.23
7.3.300.0030.00316.37
7.3.290.0030.00316.36
7.3.280.0070.00716.38
7.3.260.0060.01216.53
7.3.240.0130.00616.41
7.3.230.0060.01016.61
7.3.210.0100.01016.28
7.3.200.0030.01316.28
7.3.190.0060.01516.56
7.3.180.0000.01716.59
7.3.170.0130.01016.50
7.3.160.0060.01116.41
7.2.330.0090.00916.56
7.2.320.0100.01316.88
7.2.310.0060.00916.80
7.2.300.0060.01116.54
7.2.290.0140.00316.45
7.2.110.0610.00814.71
7.2.100.0110.01014.82
7.2.90.0490.00814.88
7.2.80.0190.00014.84
7.2.70.0050.01115.19
7.2.60.0430.00314.99
7.2.50.0350.00414.96
7.2.40.0230.01115.08
7.2.30.0080.00815.08
7.2.20.1380.01314.86
7.2.10.1010.00615.19
7.2.00.1580.00015.19
7.1.230.0060.00913.64
7.1.220.0270.00913.56
7.1.210.1170.00813.91
7.1.200.0310.00613.77
7.1.190.0120.00813.85
7.1.180.0060.01213.82
7.1.170.0120.00614.06
7.1.160.0380.00313.92
7.1.150.0140.00413.98
7.1.140.1570.00714.05
7.1.130.1450.01013.93
7.1.120.1080.00314.00
7.1.110.1210.00713.63
7.1.100.0840.01613.75
7.1.90.1880.00313.80
7.1.80.1220.00613.98
7.1.70.0980.00913.84
7.1.60.2020.00931.54
7.1.50.2120.00031.77
7.1.40.1740.00632.11
7.1.30.1910.00331.79
7.1.20.2440.02331.63
7.1.10.1550.01013.62
7.1.00.0980.00613.74
5.6.380.0150.00014.47

preferences:
31.19 ms | 403 KiB | 5 Q