3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = <<<STRING images_and_thumbnails = [ ['https://images-na.ssl-images-amazon.com/images/I/615JCt72MXL._UY575_.jpg', 'https://images-na.ssl-images-amazon.com/images/I/41rExpVS75L._US40_.jpg'], ['https://images-na.ssl-images-amazon.com/images/I/71Ss5tJW-4L._UY575_.jpg', 'https://images-na.ssl-images-amazon.com/images/I/41RpAwvZJ5L._US40_.jpg'], ['https://images-na.ssl-images-amazon.com/images/I/6157znz2BeL._UY575_.jpg', 'https://images-na.ssl-images-amazon.com/images/I/41mSje9rDSL._US40_.jpg'], ['https://images-na.ssl-images-amazon.com/images/I/815wlLde-gL._UY575_.jpg', 'https://images-na.ssl-images-amazon.com/images/I/51jty5d4BpL._US40_.jpg'], ['https://images-na.ssl-images-amazon.com/images/I/71D2gVlCUOL._UY575_.jpg', 'https://images-na.ssl-images-amazon.com/images/I/41kCBJYI%2BCL._US40_.jpg'], ['https://images-na.ssl-images-amazon.com/images/I/71EfsMWdx0L._UY575_.jpg', 'https://images-na.ssl-images-amazon.com/images/I/41utl4%2B%2B%2BoL._US40_.jpg'], ['https://images-na.ssl-images-amazon.com/images/I/61m4mFpIvVL._UY575_.jpg', 'https://images-na.ssl-images-amazon.com/images/I/41S27BGn0UL._US40_.jpg'] ] STRING; if (preg_match_all("~\s*\['([^']*)',\s*'([^']*)']~", $string, $out, PREG_SET_ORDER)) { foreach ($out as $row) { var_export($row); // to demonstrate what is generated $image = $row[1]; // for your actual usage $thumbnail = $row[2]; // for your actual usage echo "\n---\n"; } }

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.70.0110.01117.00
8.3.60.0180.00018.20
8.3.50.0070.00718.23
8.3.40.0170.00319.04
8.3.30.0090.00619.09
8.3.20.0080.00018.93
8.3.10.0080.00023.52
8.3.00.0050.00320.75
8.2.190.0060.01217.00
8.2.180.0130.00318.56
8.2.170.0080.00822.96
8.2.160.0090.00620.64
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0060.00319.89
8.2.120.0040.00426.35
8.2.110.0100.01322.39
8.2.100.0040.00818.16
8.2.90.0000.00919.38
8.2.80.0000.00818.00
8.2.70.0050.00317.80
8.2.60.0070.00418.28
8.2.50.0050.00318.10
8.2.40.0000.00719.30
8.2.30.0040.00419.49
8.2.20.0050.00318.26
8.2.10.0050.00318.07
8.2.00.0000.00817.88
8.1.280.0060.01225.92
8.1.270.0030.00623.91
8.1.260.0040.00426.35
8.1.250.0070.00028.09
8.1.240.0060.00322.18
8.1.230.0110.00019.12
8.1.220.0050.00318.04
8.1.210.0080.00018.77
8.1.200.0050.00317.60
8.1.190.0030.00617.48
8.1.180.0060.00618.10
8.1.170.0050.00318.90
8.1.160.0070.00019.07
8.1.150.0050.00319.02
8.1.140.0040.00423.83
8.1.130.0040.00417.61
8.1.120.0000.00717.54
8.1.110.0040.00417.56
8.1.100.0030.00317.67
8.1.90.0040.00417.67
8.1.80.0060.00317.56
8.1.70.0080.00017.67
8.1.60.0040.00417.69
8.1.50.0030.00617.66
8.1.40.0030.00617.68
8.1.30.0060.00317.69
8.1.20.0000.00717.69
8.1.10.0000.00917.81
8.1.00.0040.00417.73
8.0.300.0040.00418.77
8.0.290.0040.00417.00
8.0.280.0040.00418.46
8.0.270.0080.00017.38
8.0.260.0060.00017.12
8.0.250.0040.00417.20
8.0.240.0000.00717.16
8.0.230.0030.00617.09
8.0.220.0070.00317.14
8.0.210.0040.00417.04
8.0.200.0030.00317.11
8.0.190.0050.00317.11
8.0.180.0050.00217.20
8.0.170.0030.00517.21
8.0.160.0060.00317.09
8.0.150.0050.00316.99
8.0.140.0000.00717.16
8.0.130.0050.00013.54
8.0.120.0000.00717.13
8.0.110.0040.00417.06
8.0.100.0080.00017.10
8.0.90.0030.00517.03
8.0.80.0030.01517.10
8.0.70.0000.00817.19
8.0.60.0000.00717.08
8.0.50.0050.00217.12
8.0.30.0070.01217.48
8.0.20.0080.01117.54
8.0.10.0040.00417.27
8.0.00.0100.00816.87
7.4.330.0000.00515.55
7.4.320.0030.00316.78
7.4.300.0000.00616.73
7.4.290.0000.00816.72
7.4.280.0030.00716.86
7.4.270.0080.00016.71
7.4.260.0080.00316.75
7.4.250.0030.00616.81
7.4.240.0000.00716.77
7.4.230.0030.00316.61
7.4.220.0050.00316.86
7.4.210.0030.01216.96
7.4.200.0000.00716.83
7.4.160.0130.00816.75
7.4.140.0140.00917.86
7.4.130.0120.00616.80
7.4.120.0080.01216.78
7.4.110.0080.01116.91
7.4.100.0160.00616.75
7.4.90.0080.01116.78
7.4.80.0110.00719.39
7.4.70.0130.01016.78
7.4.60.0030.01416.78
7.4.50.0060.00916.91
7.4.40.0100.00716.83
7.4.00.0130.00315.20
7.3.330.0030.00313.55
7.3.320.0000.00513.32
7.3.310.0060.00016.42
7.3.300.0000.00716.47
7.3.290.0070.00016.50
7.3.280.0080.01016.52
7.3.260.0130.01416.59
7.3.240.0110.00916.67
7.3.230.0100.00716.82
7.3.210.0130.00316.50
7.3.200.0140.00416.46
7.3.190.0130.00316.60
7.3.180.0170.00316.62
7.3.170.0070.01116.53
7.3.160.0090.00616.70
7.2.330.0060.01316.93
7.2.320.0120.00816.86
7.2.310.0090.00916.93
7.2.300.0100.00716.79
7.2.290.0090.00916.66
7.2.110.0500.00314.70
7.2.100.2080.00314.73
7.2.90.0440.00614.71
7.2.80.3900.00714.81
7.2.70.5850.00714.80
7.2.60.3930.00614.93
7.2.50.4390.00715.23
7.2.40.3650.01015.26
7.2.30.3350.00615.00
7.2.20.0630.00415.10
7.2.10.0280.00715.00
7.2.00.0130.01015.06
7.1.230.0100.00513.73
7.1.220.0100.00713.90
7.1.210.1480.01013.71
7.1.200.4650.00313.61
7.1.190.5030.01013.95
7.1.180.3910.01014.00
7.1.170.4190.01614.10
7.1.160.1740.01314.13
7.1.150.1480.01314.05
7.1.140.3410.00313.96
7.1.130.0090.01013.76
7.1.120.4640.00313.72
7.1.110.1410.00713.70
7.1.100.0670.00614.08
7.1.90.0610.00314.07
7.1.80.0350.00313.93
7.1.70.0330.00013.89
7.1.60.2240.00732.02
7.1.50.0280.00831.89
7.1.40.0790.02032.00
7.1.30.0700.01131.84
7.1.20.0500.00631.91
7.1.10.0210.00714.04
7.1.00.0450.01013.86
5.6.380.0050.01013.93

preferences:
66.04 ms | 401 KiB | 5 Q