3v4l.org

run code in 300+ PHP versions simultaneously
<?php // SELECT `link_id`, `link_name`, `alias` FROM `m5cob_mt_links` WHERE `alias` = '' // indexed resultset... $resultset = [ [6, 'Convivio Bar & Restaurant Chester Cheshire UK', ''], [7, 'Slug and Lettuce Chester Cheshire UK', ''], [8, 'Da Rosa Restaurant 1 & Wine Bar Torrevieja Costa Blanca Spain', ''], [9, 'Bar Lounge Chester Cheshire UK', ''], [10, 'Telfords Warehouse Chester Cheshire UK', ''], [11, 'The Botanist Chester Cheshire UK', ''], [12, 'Missoula Chester Cheshire UK', ''], [13, 'Fiesta Havana Chester Cheshire UK', ''], [14, 'El Oceano\'s Hotel Restaurant, Torrenueva, Marbella, Malaga', ''], [15, 'La Plaza Restaurant Riviera del Sol Mijas Costa Malaga Spain', ''] ]; foreach ($resultset as $row) { $purged = preg_replace('~[^a-z ]+~', '', strtolower($row[1])); $split = preg_split('~ +~', $purged, 6, PREG_SPLIT_NO_EMPTY); $new_alias = implode('-', array_slice($split, 0, 5)); echo "{$row[0]}: $new_alias\t\t(from: {$row[1]}\n"; // UPDATE `m5cob_mt_links` SET `alias` = '$new_alias' WHERE `link_id` = $row[0] }

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.0150.00418.43
8.3.50.0070.01116.50
8.3.40.0070.00719.10
8.3.30.0100.00618.78
8.3.20.0000.00819.16
8.3.10.0040.00421.92
8.3.00.0070.00023.70
8.2.180.0100.01016.63
8.2.170.0040.01122.96
8.2.160.0110.00419.23
8.2.150.0040.00424.18
8.2.140.0030.00524.66
8.2.130.0050.00320.08
8.2.120.0100.00626.35
8.2.110.0030.00622.20
8.2.100.0040.00817.87
8.2.90.0040.00419.20
8.2.80.0040.00417.97
8.2.70.0030.00618.05
8.2.60.0000.00918.16
8.2.50.0040.00418.10
8.2.40.0040.00419.38
8.2.30.0030.00519.48
8.2.20.0040.00418.18
8.2.10.0030.00518.31
8.2.00.0000.00719.48
8.1.280.0100.01025.92
8.1.270.0060.00322.16
8.1.260.0040.00426.35
8.1.250.0030.00528.09
8.1.240.0090.00022.59
8.1.230.0090.00317.84
8.1.220.0120.00017.74
8.1.210.0080.00018.77
8.1.200.0070.00317.47
8.1.190.0030.00617.22
8.1.180.0060.00318.10
8.1.170.0030.00618.80
8.1.160.0000.00719.02
8.1.150.0060.00318.81
8.1.140.0000.00717.75
8.1.130.0030.00318.97
8.1.120.0000.00717.64
8.1.110.0000.01117.66
8.1.100.0040.00417.52
8.1.90.0000.00817.56
8.1.80.0040.00417.54
8.1.70.0070.00017.59
8.1.60.0060.00317.74
8.1.50.0040.00417.62
8.1.40.0000.00817.69
8.1.30.0050.00317.84
8.1.20.0040.00417.87
8.1.10.0060.00317.81
8.1.00.0080.00017.73
8.0.300.0060.00318.77
8.0.290.0000.00716.88
8.0.280.0000.00818.43
8.0.270.0040.00417.21
8.0.260.0050.00317.37
8.0.250.0000.00717.09
8.0.240.0000.00817.14
8.0.230.0030.00517.21
8.0.220.0030.00316.96
8.0.210.0000.00717.09
8.0.200.0040.00417.13
8.0.190.0080.00017.14
8.0.180.0000.00816.97
8.0.170.0090.00016.97
8.0.160.0000.00717.08
8.0.150.0000.00717.00
8.0.140.0000.00716.92
8.0.130.0030.00313.49
8.0.120.0100.00017.05
8.0.110.0000.00717.00
8.0.100.0000.00717.07
8.0.90.0090.00016.96
8.0.80.0080.00817.03
8.0.70.0020.00517.01
8.0.60.0020.00517.00
8.0.50.0000.00817.13
8.0.30.0120.00817.14
8.0.20.0060.01217.40
8.0.10.0040.00417.15
8.0.00.0120.01016.89
7.4.330.0000.00515.55
7.4.320.0030.00316.75
7.4.300.0030.00316.83
7.4.290.0070.00016.87
7.4.280.0070.00016.77
7.4.270.0000.00816.84
7.4.260.0000.00716.76
7.4.250.0000.01016.70
7.4.240.0000.00716.70
7.4.230.0030.00316.84
7.4.220.0040.00416.85
7.4.210.0080.00816.82
7.4.200.0000.00716.91
7.4.160.0070.00916.72
7.4.140.0120.00917.86
7.4.130.0140.00416.64
7.4.120.0100.00716.74
7.4.110.0130.00416.85
7.4.100.0100.00716.80
7.4.90.0080.01117.00
7.4.80.0140.00319.39
7.4.70.0140.00316.48
7.4.60.0000.01816.70
7.4.50.0070.00716.69
7.4.40.0040.01316.57
7.4.10.0070.01015.34
7.4.00.0080.00815.26
7.3.330.0000.00513.38
7.3.320.0030.00313.48
7.3.310.0030.00316.55
7.3.300.0040.00416.49
7.3.290.0000.00716.36
7.3.280.0030.01216.57
7.3.260.0100.00816.76
7.3.240.0050.01316.76
7.3.230.0090.00916.50
7.3.210.0090.01216.60
7.3.200.0060.00916.53
7.3.190.0160.00016.85
7.3.180.0100.00616.60
7.3.170.0100.00716.71
7.3.160.0070.01116.82
7.3.130.0090.00914.70
7.3.120.0100.00915.08
7.3.110.0080.00915.04
7.3.100.0060.00714.86
7.3.90.0070.00815.09
7.3.80.0080.00814.97
7.3.70.0060.00615.08
7.3.60.0050.00815.03
7.3.50.0040.00914.91
7.3.40.0070.00414.97
7.3.30.0040.01014.93
7.3.20.0090.00716.69
7.3.10.0080.00716.69
7.3.00.0070.00716.85
7.2.330.0130.01316.98
7.2.320.0060.01616.75
7.2.310.0140.00516.95
7.2.300.0130.01017.02
7.2.290.0110.00716.67
7.2.260.0030.01315.20
7.2.250.0080.00915.27
7.2.240.0130.00515.23
7.2.230.0050.00915.21
7.2.220.0060.00915.29
7.2.210.0030.01115.32
7.2.200.0060.00615.19
7.2.190.0060.00715.02
7.2.180.0060.00715.35
7.2.170.0050.01015.24
7.2.160.0030.00814.96
7.2.150.0030.01317.05
7.2.140.0030.01417.27
7.2.130.0070.00317.18
7.2.120.0030.01017.16
7.2.110.0090.00617.25
7.2.100.0030.01317.26
7.2.90.0030.01317.27
7.2.80.0000.01617.02
7.2.70.0120.01016.20
7.2.60.0180.00416.34
7.2.50.0140.00816.27
7.2.40.0080.01516.15
7.2.30.0140.01016.18
7.2.20.0160.00516.10
7.2.10.0050.01616.21
7.2.00.0110.00916.30
7.1.330.0080.00715.92
7.1.320.0030.01015.88
7.1.310.0050.00916.05
7.1.300.0050.00815.89
7.1.290.0040.00615.88
7.1.280.0050.00715.95
7.1.270.0090.00415.87
7.1.260.0060.01015.99
7.1.250.0040.00715.76
7.1.240.0070.00415.98
7.1.230.0040.01115.97
7.1.220.0140.00316.05
7.1.210.0040.00816.02
7.1.200.0010.00815.96
7.1.190.0030.01216.01
7.1.180.0030.01415.84
7.1.170.0070.01014.71
7.1.160.0110.00915.22
7.1.150.0160.00714.88
7.1.140.0120.00714.92
7.1.130.0160.00615.07
7.1.120.0120.00914.91
7.1.110.0090.01115.01
7.1.100.0050.01714.88
7.1.90.0140.00615.09
7.1.80.0110.01215.10
7.1.70.0100.01114.87
7.1.60.0210.00924.01
7.1.50.0220.01124.02
7.1.40.0240.01023.92
7.1.30.0160.01524.06
7.1.20.0300.00524.09
7.1.10.0190.00714.91
7.1.00.0080.00614.90
7.0.330.0000.01515.36
7.0.320.0060.00315.48
7.0.310.0000.01515.62
7.0.300.0030.01015.43
7.0.290.0060.01015.39
7.0.280.0100.00315.50
7.0.270.0110.00015.46
7.0.260.0040.01115.49
7.0.250.0030.00515.79
7.0.240.0030.00915.37
7.0.230.0030.01115.65
7.0.220.0030.01015.80
7.0.210.0070.00315.64
7.0.200.0030.00915.55
7.0.190.0040.00815.75
7.0.180.0030.01015.68
7.0.170.0000.00815.77
7.0.160.0040.00715.57
7.0.150.0030.00915.74
7.0.140.0060.00615.38
7.0.130.0000.01315.55
7.0.120.0030.01015.75
7.0.110.0060.01015.47
7.0.100.0030.00915.61
7.0.90.0030.00615.71
7.0.80.0090.00615.62
7.0.70.0100.00315.76
7.0.60.0030.00715.48
7.0.50.0070.00715.81
7.0.40.0030.01213.65
7.0.30.0040.01113.82
7.0.20.0000.00913.79
7.0.10.0000.01213.67
7.0.00.0070.00713.45
5.6.400.0070.01014.35
5.6.390.0060.00614.37
5.6.380.0120.00314.25
5.6.370.0110.00714.81
5.6.360.0030.01014.45
5.6.350.0070.01014.13
5.6.340.0110.00714.64
5.6.330.0030.01014.41
5.6.320.0030.01014.51
5.6.310.0030.01014.64
5.6.300.0060.00914.55
5.6.290.0030.01014.77
5.6.280.0060.00914.45
5.6.270.0060.00614.56
5.6.260.0070.00314.51
5.6.250.0040.01114.66
5.6.240.0070.00714.31
5.6.230.0060.00914.74
5.6.220.0030.00614.46
5.6.210.0070.00414.29
5.6.200.0070.00414.46
5.6.190.0080.00314.57
5.6.180.0070.01114.70
5.6.170.0060.00914.59
5.6.160.0050.00314.25
5.6.150.0000.01114.70
5.6.140.0030.00714.41
5.6.130.0100.00314.63
5.6.120.0080.00014.31
5.6.110.0030.00614.30
5.6.100.0100.00314.69
5.6.90.0000.01514.76
5.6.80.0030.00914.07
5.6.70.0040.00714.36
5.6.60.0030.00714.25
5.6.50.0100.00314.23
5.6.40.0030.01214.41
5.6.30.0060.00314.13
5.6.20.0000.01214.13
5.6.10.0110.00414.13
5.6.00.0000.00914.27

preferences:
51.47 ms | 400 KiB | 5 Q