3v4l.org

run code in 300+ PHP versions simultaneously
<?php $bigKml = "<Document><name>test2.kmz</name><br><img src='files/bagel.png'><br><br></Document>"; $titleTagPattern = '/<Document><name>.*?<\/name>/'; preg_match($titleTagPattern, $bigKml, $titleTags); $titleTag = $titleTags[0]; $len = strlen($titleTag); $startTagLen = 16; $endTagLen = 11; $kmzTitle = substr($titleTag, $startTagLen, $len - $startTagLen - $endTagLen); print_r($kmzTitle . "\n"); $imgPattern = "/<img src=.*?>/"; preg_match($imgPattern, $bigKml, $imageTags); print_r($imageTags); foreach($imageTags as $imageTag) { $urlPattern = "/'([^']*)'/"; preg_match($urlPattern, $imageTag, $oldUrls); $oldUrl = $oldUrls[1]; //the second element contains the match without the quotes print_r($oldUrl . "\n"); $newUrl = "/var/www/resources/" . $kmzTitle . '/' . $oldUrl; print_r($newUrl . "\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.60.0110.00718.43
8.3.50.0070.01121.99
8.3.40.0040.01119.09
8.3.30.0070.00718.92
8.3.20.0040.00418.77
8.3.10.0040.00420.98
8.3.00.0040.00421.82
8.2.180.0120.00916.75
8.2.170.0100.00722.96
8.2.160.0070.00720.35
8.2.150.0080.00024.18
8.2.140.0050.00324.66
8.2.130.0040.00426.16
8.2.120.0040.00421.19
8.2.110.0100.00020.35
8.2.100.0110.00018.03
8.2.90.0030.00519.17
8.2.80.0040.00418.04
8.2.70.0080.00018.00
8.2.60.0000.00817.93
8.2.50.0000.00818.07
8.2.40.0060.00318.15
8.2.30.0040.00419.99
8.2.20.0030.00517.86
8.2.10.0000.00817.84
8.2.00.0040.00417.77
8.1.280.0130.00325.92
8.1.270.0050.00323.99
8.1.260.0040.00426.35
8.1.250.0070.00028.09
8.1.240.0030.00622.42
8.1.230.0060.00620.84
8.1.220.0050.00318.77
8.1.210.0080.00019.04
8.1.200.0040.00417.35
8.1.190.0000.00819.32
8.1.180.0060.00318.10
8.1.170.0040.00418.71
8.1.160.0070.00018.97
8.1.150.0040.00418.90
8.1.140.0030.00517.52
8.1.130.0030.00317.90
8.1.120.0040.00417.54
8.1.110.0040.00417.53
8.1.100.0000.00717.57
8.1.90.0040.00417.51
8.1.80.0000.00817.68
8.1.70.0030.00317.59
8.1.60.0070.00317.61
8.1.50.0050.00417.54
8.1.40.0000.00717.71
8.1.30.0040.00417.63
8.1.20.0050.00317.82
8.1.10.0040.00417.61
8.1.00.0060.00317.63
8.0.300.0070.00020.02
8.0.290.0080.00017.18
8.0.280.0070.00018.47
8.0.270.0030.00317.34
8.0.260.0030.00317.00
8.0.250.0040.00417.01
8.0.240.0030.00617.01
8.0.230.0080.00016.98
8.0.220.0000.00817.01
8.0.210.0000.00717.06
8.0.200.0000.00617.09
8.0.190.0060.00317.14
8.0.180.0040.00417.02
8.0.170.0040.00416.96
8.0.160.0040.00417.09
8.0.150.0000.00916.88
8.0.140.0000.00717.04
8.0.130.0000.00813.55
8.0.120.0000.00816.98
8.0.110.0060.00316.82
8.0.100.0000.00716.97
8.0.90.0000.00716.92
8.0.80.0090.00616.99
8.0.70.0050.00316.90
8.0.60.0070.00017.14
8.0.50.0000.00816.94
8.0.30.0140.00517.15
8.0.20.0110.00917.40
8.0.10.0050.00317.02
8.0.00.0060.01316.94
7.4.330.0000.00514.86
7.4.320.0030.00316.79
7.4.300.0060.00016.68
7.4.290.0050.00316.66
7.4.280.0040.00416.82
7.4.270.0030.00516.71
7.4.260.0020.00513.56
7.4.250.0000.00716.63
7.4.240.0000.00816.82
7.4.230.0000.00716.83
7.4.220.0100.00716.59
7.4.210.0060.00916.81
7.4.200.0040.00416.91
7.4.190.0030.00316.84
7.4.160.0060.01016.75
7.4.150.0100.00717.40
7.4.140.0120.00717.86
7.4.130.0090.01216.79
7.4.120.0050.01216.69
7.4.110.0070.01016.54
7.4.100.0120.00816.58
7.4.90.0100.00716.51
7.4.80.0080.00819.37
7.4.70.0030.01316.82
7.4.60.0070.01016.93
7.4.50.0050.00516.66
7.4.40.0030.00822.27
7.4.30.0090.01316.77
7.4.00.0120.00415.09
7.3.330.0030.00313.38
7.3.320.0000.01713.18
7.3.310.0000.00816.54
7.3.300.0000.00616.48
7.3.290.0080.00816.52
7.3.280.0070.01116.50
7.3.270.0100.00617.40
7.3.260.0100.00818.24
7.3.250.0080.01316.59
7.3.240.0120.00916.48
7.3.230.0140.00916.51
7.3.210.0120.00616.37
7.3.200.0100.00719.39
7.3.190.0060.01216.50
7.3.180.0100.00716.51
7.3.170.0060.01416.83
7.3.160.0120.00916.60
7.3.120.0120.00014.88
7.2.330.0150.00916.72
7.2.320.0030.02116.89
7.2.310.0150.00316.82
7.2.300.0100.00716.78
7.2.290.0070.01116.87
7.2.60.0090.00617.22
7.2.00.0030.01219.86
7.1.200.0080.00416.22
7.1.100.0060.00618.56
7.1.70.0030.00717.13
7.1.60.0070.00719.40
7.1.50.0260.00617.09
7.1.00.0000.07022.32
7.0.200.0030.00517.01
7.0.140.0000.10022.21
7.0.60.0030.08021.73
7.0.50.0130.07022.18
7.0.40.0100.07320.04
7.0.30.0030.07320.20
7.0.20.0030.08720.11
7.0.10.0000.08720.10
7.0.00.0030.08020.02
5.6.280.0130.06321.07
5.6.210.0000.08020.70
5.6.200.0070.07721.04
5.6.190.0030.08321.02
5.6.180.0030.08320.99
5.6.170.0030.06021.09
5.6.160.0070.07321.09
5.6.150.0070.08020.99
5.6.140.0070.08321.00
5.6.130.0030.08021.00
5.6.120.0070.07720.95
5.6.110.0100.08021.13
5.6.100.0070.07720.97
5.6.90.0100.06721.02
5.6.80.0030.06320.38
5.6.70.0100.08020.50
5.6.60.0100.06020.31
5.6.50.0130.07020.53
5.6.40.0030.07720.50
5.6.30.0070.05320.34
5.6.20.0070.06320.45
5.6.10.0030.08320.49
5.6.00.0030.05320.46
5.5.350.0030.07720.43
5.5.340.0030.07320.74
5.5.330.0030.08320.68
5.5.320.0130.07020.80
5.5.310.0070.06020.73
5.5.300.0000.08720.80
5.5.290.0030.08720.85
5.5.280.0170.07320.96
5.5.270.0070.06020.76
5.5.260.0170.07720.86
5.5.250.0000.08720.61
5.5.240.0070.06720.19
5.5.230.0000.05020.15
5.5.220.0030.05020.05
5.5.210.0130.03720.14
5.5.200.0100.07320.23
5.5.190.0030.06320.08
5.5.180.0100.04720.22
5.5.160.0070.06020.09
5.5.150.0130.07320.12
5.5.140.0030.07320.12
5.5.130.0030.08020.22
5.5.120.0030.07320.23
5.5.110.0000.07720.21
5.5.100.0100.06720.08
5.5.90.0000.07720.01
5.5.80.0000.04019.89
5.5.70.0030.06019.96
5.5.60.0030.08720.13
5.5.50.0070.06720.04
5.5.40.0030.06020.03
5.5.30.0030.08020.12
5.5.20.0000.07019.99
5.5.10.0030.06720.00
5.5.00.0130.05719.96
5.4.450.0030.08319.39
5.4.440.0070.07719.52
5.4.430.0070.06719.33
5.4.420.0030.07019.24
5.4.410.0070.07319.25
5.4.400.0070.04718.91
5.4.390.0000.07718.93
5.4.380.0030.05718.89
5.4.370.0000.06019.16
5.4.360.0030.07019.07
5.4.350.0070.08319.07
5.4.340.0170.07019.01
5.4.320.0170.07019.05
5.4.310.0000.07319.07
5.4.300.0100.07319.19
5.4.290.0070.07019.16
5.4.280.0130.06719.00
5.4.270.0030.07719.04
5.4.260.0030.07718.90
5.4.250.0070.07018.90
5.4.240.0070.07019.15
5.4.230.0070.06318.93
5.4.220.0070.05319.11
5.4.210.0070.06319.04
5.4.200.0100.07018.91
5.4.190.0100.07019.06
5.4.180.0030.06019.18
5.4.170.0030.07019.03
5.4.160.0000.06018.89
5.4.150.0030.07718.90
5.4.140.0000.07016.25
5.4.130.0070.07016.51
5.4.120.0100.06316.50
5.4.110.0130.06716.60
5.4.100.0070.06316.56
5.4.90.0000.07016.41
5.4.80.0000.08016.29
5.4.70.0070.06716.41
5.4.60.0000.06716.34
5.4.50.0000.07016.30
5.4.40.0100.06716.43
5.4.30.0100.06316.21
5.4.20.0100.05716.30
5.4.10.0030.08016.31
5.4.00.0130.05015.67
5.3.290.0030.07314.71
5.3.280.0030.07714.55
5.3.270.0030.06314.62
5.3.260.0070.07714.56
5.3.250.0000.06714.59
5.3.240.0030.07014.70
5.3.230.0000.08014.65
5.3.220.0100.06314.52
5.3.210.0030.07714.61
5.3.200.0070.07314.58
5.3.190.0070.08014.62
5.3.180.0030.06014.66
5.3.170.0030.07014.64
5.3.160.0070.07314.47
5.3.150.0100.06714.52
5.3.140.0170.06314.54
5.3.130.0000.08314.61
5.3.120.0100.06714.56
5.3.110.0100.07014.60
5.3.100.0030.07313.89
5.3.90.0070.07714.08
5.3.80.0000.07314.12
5.3.70.0000.07313.86
5.3.60.0030.05714.05
5.3.50.0030.05013.98
5.3.40.0030.07013.99
5.3.30.0000.07713.89
5.3.20.0070.06713.70
5.3.10.0000.07013.56
5.3.00.0000.07313.49
5.2.170.0000.05310.99
5.2.160.0000.05311.03
5.2.150.0030.06011.25
5.2.140.0030.06311.04
5.2.130.0070.05711.14
5.2.120.0000.06010.95
5.2.110.0000.06710.99
5.2.100.0000.06311.14
5.2.90.0070.05711.08
5.2.80.0000.06311.15
5.2.70.0000.06311.14
5.2.60.0070.03711.10
5.2.50.0030.02711.00
5.2.40.0000.03011.00
5.2.30.0030.03710.99
5.2.20.0070.03711.05
5.2.10.0000.05710.96
5.2.00.0000.05310.88
5.1.60.0030.04310.88
5.1.50.0070.04710.88
5.1.40.0070.05010.88
5.1.30.0000.04310.88
5.1.20.0000.05710.88
5.1.10.0000.05710.88
5.1.00.0070.05310.88
5.0.50.0030.05010.88
5.0.40.0030.04010.88
5.0.30.0030.06010.88
5.0.20.0030.04710.88
5.0.10.0000.03710.88
5.0.00.0000.05710.88
4.4.90.0000.03710.88
4.4.80.0030.01310.88
4.4.70.0000.02310.88
4.4.60.0070.03310.88
4.4.50.0000.01710.88
4.4.40.0000.05310.88
4.4.30.0000.03010.88
4.4.20.0000.02710.88
4.4.10.0000.03710.88
4.4.00.0000.05310.88
4.3.110.0030.02710.88
4.3.100.0030.03310.88
4.3.90.0000.04010.88
4.3.80.0030.04310.88
4.3.70.0000.03010.88
4.3.60.0070.03010.88
4.3.50.0000.03710.88
4.3.40.0000.03710.88
4.3.30.0000.03310.88
4.3.20.0000.03310.88
4.3.10.0000.04010.88
4.3.00.0030.03310.88

preferences:
42.27 ms | 401 KiB | 5 Q