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.0140.00716.63
8.3.50.0140.00216.42
8.3.40.0110.00419.09
8.3.30.0000.01518.92
8.3.20.0120.00318.94
8.3.10.0060.00320.77
8.3.00.0000.00819.63
8.2.180.0150.00316.63
8.2.170.0040.01122.96
8.2.160.0100.00321.37
8.2.150.0070.00024.18
8.2.140.0040.00424.66
8.2.130.0070.00026.16
8.2.120.0080.00021.19
8.2.110.0060.00320.37
8.2.100.0080.00418.04
8.2.90.0030.00618.15
8.2.80.0030.00619.27
8.2.70.0040.00417.75
8.2.60.0040.00417.93
8.2.50.0000.00918.07
8.2.40.0060.00618.22
8.2.30.0040.00718.13
8.2.20.0060.00317.88
8.2.10.0040.00417.97
8.2.00.0040.00417.89
8.1.280.0130.00325.92
8.1.270.0040.00424.66
8.1.260.0050.00326.35
8.1.250.0050.00328.09
8.1.240.0090.00022.10
8.1.230.0040.00721.00
8.1.220.0000.00917.74
8.1.210.0080.00018.95
8.1.200.0060.00317.48
8.1.190.0000.00817.40
8.1.180.0040.00418.10
8.1.170.0060.00318.75
8.1.160.0000.00718.79
8.1.150.0000.00718.79
8.1.140.0040.00417.56
8.1.130.0000.00817.76
8.1.120.0050.00217.52
8.1.110.0040.00417.65
8.1.100.0050.00317.46
8.1.90.0000.00717.62
8.1.80.0000.00717.56
8.1.70.0030.00317.60
8.1.60.0000.00917.61
8.1.50.0060.00317.65
8.1.40.0060.00317.69
8.1.30.0080.00017.81
8.1.20.0040.00417.86
8.1.10.0030.00517.64
8.1.00.0000.00917.67
8.0.300.0040.00420.09
8.0.290.0060.00316.88
8.0.280.0080.00018.31
8.0.270.0030.00317.31
8.0.260.0000.00716.90
8.0.250.0030.00517.04
8.0.240.0030.00616.99
8.0.230.0040.00417.14
8.0.220.0000.00717.03
8.0.210.0030.00417.01
8.0.200.0050.00217.12
8.0.190.0040.00417.10
8.0.180.0040.00416.95
8.0.170.0090.00017.08
8.0.160.0040.00417.09
8.0.150.0070.00316.99
8.0.140.0090.00016.89
8.0.130.0030.00313.50
8.0.120.0030.00616.98
8.0.110.0000.00717.07
8.0.100.0080.00017.04
8.0.90.0000.00817.11
8.0.80.0090.00617.04
8.0.70.0050.00316.92
8.0.60.0050.00217.00
8.0.50.0000.00917.07
8.0.30.0070.01217.28
8.0.20.0080.01117.36
8.0.10.0040.00417.19
8.0.00.0130.00816.72
7.4.330.0050.00013.18
7.4.320.0000.00616.80
7.4.300.0030.00316.79
7.4.290.0000.00716.73
7.4.280.0040.00416.73
7.4.270.0000.00716.61
7.4.260.0000.00513.50
7.4.250.0000.00816.79
7.4.240.0050.00216.74
7.4.230.0030.00316.61
7.4.220.0140.00316.80
7.4.210.0100.00816.84
7.4.200.0040.00416.71
7.4.190.0030.00316.75
7.4.160.0030.01316.70
7.4.150.0180.00316.61
7.4.140.0110.00716.68
7.4.130.0090.00916.70
7.4.120.0090.00816.62
7.4.110.0140.00316.82
7.4.100.0100.00716.70
7.4.90.0060.01216.61
7.4.80.0090.00919.39
7.4.70.0000.01716.66
7.4.60.0130.00716.74
7.4.50.0000.00916.73
7.4.40.0070.01116.75
7.4.30.0080.00816.48
7.4.00.0100.00815.03
7.3.330.0060.00013.23
7.3.320.0050.00013.31
7.3.310.0030.00516.51
7.3.300.0070.00016.50
7.3.290.0090.00616.58
7.3.280.0100.00816.44
7.3.270.0120.00616.68
7.3.260.0110.00716.65
7.3.250.0140.00816.66
7.3.240.0170.00616.58
7.3.230.0110.00916.53
7.3.210.0110.00716.52
7.3.200.0120.00816.60
7.3.190.0060.01616.50
7.3.180.0110.00516.57
7.3.170.0180.00016.59
7.3.160.0090.00916.50
7.3.120.0090.00614.84
7.3.110.0110.00714.83
7.3.100.0070.01015.04
7.3.90.0100.00314.73
7.3.80.0060.00915.29
7.3.70.0100.00314.97
7.3.60.0030.01015.04
7.3.50.0070.00714.88
7.3.40.0060.00314.71
7.3.30.0060.00614.93
7.3.20.0070.01016.99
7.3.10.0060.00616.63
7.3.00.0030.01016.50
7.2.330.0080.01016.93
7.2.320.0090.01516.90
7.2.310.0090.00816.80
7.2.300.0040.01316.77
7.2.290.0080.01016.86
7.2.250.0070.01015.05
7.2.240.0100.01015.13
7.2.230.0080.00815.07
7.2.220.0070.00315.32
7.2.210.0110.00015.01
7.2.200.0050.00515.12
7.2.190.0140.00314.90
7.2.180.0140.00315.17
7.2.170.0030.00915.34
7.2.00.0030.01319.79
7.1.330.0080.00816.02
7.1.320.0080.00815.85
7.1.310.0030.00715.81
7.1.300.0030.00716.04
7.1.290.0080.00415.76
7.1.280.0120.00316.01
7.1.270.0060.00615.59
7.1.260.0000.01216.02
7.1.100.0030.00918.52
7.1.70.0060.01217.39
7.1.60.0070.01719.40
7.1.50.0090.01217.25
7.1.00.0030.04022.44
7.0.200.0030.00717.04
7.0.140.0030.07322.09
7.0.120.0000.07722.23
7.0.60.0070.08319.95
7.0.50.0100.08017.89
7.0.40.0030.06320.15
7.0.30.0200.08320.21
7.0.20.0300.07020.18
7.0.10.0100.08020.11
7.0.00.0070.04720.18
5.6.280.0070.07021.00
5.6.210.0030.08720.45
5.6.200.0100.07718.23
5.6.190.0000.09020.61
5.6.180.3500.03720.49
5.6.170.0200.05020.56
5.6.160.0130.04020.68
5.6.150.0130.07718.18
5.6.140.0030.04718.26
5.6.130.0130.07718.18
5.6.120.0130.04721.14
5.6.110.0130.07320.98
5.6.100.0170.07721.09
5.6.90.0230.07320.96
5.6.80.0030.07720.38
5.6.70.2700.04020.38
5.5.350.0000.04020.44
5.5.340.0070.04018.03
5.5.330.0030.05020.27
5.5.320.0330.05720.34
5.5.310.0230.06020.30
5.5.300.0070.07318.08
5.5.290.0100.08018.02
5.5.280.0070.04020.87
5.5.270.0130.08020.88
5.5.260.0030.04320.88
5.5.250.0130.06320.49
5.5.240.0000.07720.28
5.4.450.0100.07719.18
5.4.440.0030.05719.47
5.4.430.0130.05019.44
5.4.420.0100.05019.40
5.4.410.0100.06319.20
5.4.400.0100.04019.25
5.4.390.0100.07019.00
5.4.380.0100.07319.00
5.4.370.0170.06719.23
5.4.360.0100.04019.20
5.4.350.0100.03319.24
5.4.340.0070.04719.12
5.4.320.0100.05719.20
5.4.310.0100.04019.24
5.4.300.0000.08019.11
5.4.290.0130.05718.97
5.4.280.0030.04019.11
5.4.270.0170.06319.14
5.4.260.0070.05719.20
5.4.250.0100.07319.14
5.4.240.0130.07319.07
5.4.230.0000.07019.20
5.4.220.0030.05018.91
5.4.210.0000.05718.84
5.4.200.0100.06318.86
5.4.190.0030.07019.23
5.4.180.0100.07318.99
5.4.170.0070.05019.09
5.4.160.0030.04718.94
5.4.150.0030.06719.14
5.4.140.0030.04316.45
5.4.130.0030.04316.59
5.4.120.0070.07716.44
5.4.110.0070.07316.47
5.4.100.0000.06016.32
5.4.90.0130.06716.46
5.4.80.0030.04016.48
5.4.70.0000.07716.42
5.4.60.0070.05316.36
5.4.50.0070.07316.64
5.4.40.0070.05316.28
5.4.30.0170.04316.32
5.4.20.0100.07316.27
5.4.10.0170.06316.27
5.4.00.0070.05015.90
5.3.290.0100.06714.67
5.3.280.0030.07714.62
5.3.270.0000.08314.63
5.3.260.0100.03314.62
5.3.250.0100.07014.66
5.3.240.0100.07314.66
5.3.230.0030.06714.62
5.3.220.0070.03714.59
5.3.210.0100.05714.62
5.3.200.0030.07014.47
5.3.190.0030.05314.57
5.3.180.0030.05014.59
5.3.170.0030.07714.71
5.3.160.0170.06714.71
5.3.150.0030.04714.61
5.3.140.0070.07014.56
5.3.130.0030.05014.58
5.3.120.0070.05714.61
5.3.110.0000.05714.59
5.3.100.0030.04314.08
5.3.90.0030.07014.05
5.3.80.0100.07013.96
5.3.70.0100.05014.17
5.3.60.0100.05314.05
5.3.50.0070.04013.99
5.3.40.0030.04013.98
5.3.30.0070.05013.96
5.3.20.0170.06013.69
5.3.10.0070.06013.71
5.3.00.0030.03713.60
5.2.170.0130.05311.20
5.2.160.0070.03711.14
5.2.150.0130.02311.06
5.2.140.0030.03711.30
5.2.130.0100.05711.06
5.2.120.0070.04311.25
5.2.110.0000.03311.09
5.2.100.0030.03011.15
5.2.90.0070.02311.25
5.2.80.0130.05011.09
5.2.70.0030.06311.16
5.2.60.0070.06011.01
5.2.50.0030.05011.04
5.2.40.0030.03711.00
5.2.30.0000.03310.98
5.2.20.0100.03010.96
5.2.10.0070.06310.82
5.2.00.0100.05310.67
5.1.60.0000.0409.84
5.1.50.0000.0439.99
5.1.40.0030.04710.04
5.1.30.0030.03710.48
5.1.20.0030.03710.22
5.1.10.0030.0279.97
5.1.00.0000.04710.06
5.0.50.0000.0478.71
5.0.40.0030.0278.50
5.0.30.0070.0638.50
5.0.20.0030.0538.50
5.0.10.0000.0438.50
5.0.00.0070.0508.50
4.4.90.0030.0208.50
4.4.80.0030.0178.50
4.4.70.0030.0178.50
4.4.60.0000.0178.50
4.4.50.0030.0138.50
4.4.40.0030.0278.50
4.4.30.0000.0178.50
4.4.20.0030.0138.50
4.4.10.0030.0308.50
4.4.00.0000.0408.50
4.3.110.0030.0338.50
4.3.100.0030.0278.50
4.3.90.0030.0138.50
4.3.80.0000.0408.50
4.3.70.0000.0338.50
4.3.60.0070.0338.50
4.3.50.0030.0278.50
4.3.40.0000.0478.50
4.3.30.0000.0208.50
4.3.20.0030.0338.50
4.3.10.0000.0378.50
4.3.00.0000.0238.50

preferences:
43.79 ms | 401 KiB | 5 Q