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); $title = substr($titleTag, 16, $len - 23); print_r($title . '\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/" . $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.0080.00816.75
8.3.50.0120.00717.52
8.3.40.0170.00319.09
8.3.30.0110.00418.70
8.3.20.0080.00019.03
8.3.10.0090.00020.50
8.3.00.0090.00017.88
8.2.180.0130.00616.50
8.2.170.0110.00322.96
8.2.160.0000.01422.39
8.2.150.0090.00024.18
8.2.140.0070.00424.66
8.2.130.0040.00426.16
8.2.120.0040.00420.01
8.2.110.0060.00321.07
8.2.100.0080.00317.91
8.2.90.0040.00419.14
8.2.80.0080.00017.97
8.2.70.0040.00417.88
8.2.60.0090.00017.80
8.2.50.0040.00418.07
8.2.40.0040.00418.34
8.2.30.0030.00518.21
8.2.20.0040.00417.88
8.2.10.0000.00817.80
8.2.00.0080.00017.96
8.1.280.0110.00725.92
8.1.270.0080.00024.66
8.1.260.0080.00026.35
8.1.250.0000.00728.09
8.1.240.0060.00322.71
8.1.230.0040.00820.89
8.1.220.0080.00018.77
8.1.210.0060.00318.83
8.1.200.0070.00317.35
8.1.190.0040.00417.40
8.1.180.0080.00018.10
8.1.170.0000.00818.96
8.1.160.0000.00818.94
8.1.150.0000.00718.78
8.1.140.0040.00417.61
8.1.130.0040.00417.73
8.1.120.0050.00217.61
8.1.110.0070.00017.59
8.1.100.0040.00417.54
8.1.90.0030.00617.60
8.1.80.0000.00817.53
8.1.70.0030.00317.60
8.1.60.0020.00517.76
8.1.50.0040.00417.53
8.1.40.0080.00017.61
8.1.30.0000.00817.71
8.1.20.0090.00017.74
8.1.10.0040.00417.71
8.1.00.0050.00317.74
8.0.300.0000.00919.94
8.0.290.0040.00416.88
8.0.280.0070.00018.39
8.0.270.0030.00317.35
8.0.260.0000.00716.88
8.0.250.0000.00817.12
8.0.240.0000.01117.14
8.0.230.0000.00717.08
8.0.220.0070.00016.95
8.0.210.0000.00917.03
8.0.200.0000.00917.02
8.0.190.0040.00417.12
8.0.180.0040.00417.04
8.0.170.0050.00317.04
8.0.160.0020.00517.02
8.0.150.0070.00316.99
8.0.140.0000.00817.02
8.0.130.0060.00013.50
8.0.120.0020.00516.97
8.0.110.0040.00416.96
8.0.100.0040.00417.11
8.0.90.0070.00016.91
8.0.80.0000.01817.07
8.0.70.0000.00717.02
8.0.60.0040.00416.97
8.0.50.0000.00717.03
8.0.30.0120.00717.19
8.0.20.0120.01017.32
8.0.10.0040.00416.98
8.0.00.0140.00516.73
7.4.330.0000.00513.19
7.4.320.0030.00316.67
7.4.300.0000.00616.83
7.4.290.0000.00716.82
7.4.280.0000.00816.72
7.4.270.0060.00316.67
7.4.260.0000.00613.49
7.4.250.0040.00416.72
7.4.240.0030.00316.73
7.4.230.0040.00416.56
7.4.220.0100.00716.76
7.4.210.0070.01016.76
7.4.200.0070.00016.90
7.4.190.0020.00516.96
7.4.160.0060.01016.81
7.4.150.0100.01016.56
7.4.140.0070.01116.73
7.4.130.0100.00916.69
7.4.120.0100.00816.70
7.4.110.0120.00616.79
7.4.100.0140.00416.67
7.4.90.0140.00716.52
7.4.80.0120.00916.55
7.4.70.0130.00416.51
7.4.60.0080.00916.82
7.4.50.0040.00416.77
7.4.40.0040.01416.52
7.4.30.0120.00616.59
7.4.00.0080.00814.97
7.3.330.0030.00313.17
7.3.320.0000.00513.45
7.3.310.0050.00216.56
7.3.300.0000.00716.39
7.3.290.0070.01316.54
7.3.280.0040.01216.51
7.3.270.0150.00616.70
7.3.260.0080.00916.60
7.3.250.0100.00816.61
7.3.240.0110.00716.51
7.3.230.0110.01116.88
7.3.210.0100.00716.71
7.3.200.0130.00719.39
7.3.190.0160.00316.73
7.3.180.0070.01016.50
7.3.170.0090.00916.55
7.3.160.0070.00816.67
7.3.120.0070.01015.02
7.3.110.0100.00714.98
7.3.100.0070.01014.84
7.3.90.0090.00014.83
7.3.80.0140.00015.17
7.3.70.0080.00615.02
7.3.60.0070.01114.95
7.3.50.0030.01015.05
7.3.40.0060.00914.91
7.3.30.0080.00314.86
7.3.20.0040.00816.84
7.3.10.0080.00916.76
7.3.00.0120.00616.77
7.2.330.0090.01216.75
7.2.320.0120.01016.78
7.2.310.0090.01216.99
7.2.300.0170.00016.81
7.2.290.0070.01116.85
7.2.250.0090.00915.32
7.2.240.0030.01215.25
7.2.230.0090.00915.05
7.2.220.0070.00715.50
7.2.210.0090.00915.28
7.2.200.0030.01015.30
7.2.190.0030.00915.02
7.2.180.0080.00415.46
7.2.170.0070.00715.32
7.2.130.0120.00916.88
7.2.120.0070.01016.60
7.2.110.0060.01216.77
7.2.100.0110.01116.99
7.2.90.0130.01016.93
7.2.80.0150.00616.82
7.2.70.0180.00616.64
7.2.60.0200.00316.84
7.2.50.0130.01016.77
7.2.40.0180.00416.41
7.2.30.0160.00616.55
7.2.20.0080.00816.77
7.2.10.0100.01316.73
7.2.00.0130.00418.42
7.1.330.0040.01115.81
7.1.320.0030.00615.57
7.1.310.0050.00515.97
7.1.300.0060.00915.95
7.1.290.0030.01015.68
7.1.280.0000.01615.98
7.1.270.0040.00415.75
7.1.260.0040.01516.12
7.1.250.0140.00715.43
7.1.100.0070.00418.32
7.1.70.0030.01317.42
7.1.60.0030.01719.40
7.1.50.0130.01016.85
7.1.00.0100.05722.38
7.0.200.0220.00614.81
7.0.140.0030.07322.12
7.0.120.0000.06722.08
7.0.60.0030.04320.07
7.0.50.0130.07717.89
7.0.40.0100.08720.26
7.0.30.0300.05020.09
7.0.20.0300.08020.23
7.0.10.0100.08020.26
7.0.00.0030.07020.29
5.6.280.0030.07021.03
5.6.210.0130.07020.50
5.6.200.0100.06318.29
5.6.190.0170.03320.41
5.6.180.0270.05720.48
5.6.170.0170.05320.56
5.6.160.0070.08020.76
5.6.150.0170.07318.15
5.6.140.0100.04318.27
5.6.130.0000.05018.18
5.6.120.0130.08321.09
5.6.110.0130.07320.99
5.6.100.0100.07720.92
5.6.90.0130.07320.98
5.6.80.0030.09020.37
5.5.350.0300.07320.35
5.5.340.0070.07018.08
5.5.330.0170.05720.27
5.5.320.0200.03720.35
5.5.310.0230.04720.32
5.5.300.0000.04317.98
5.5.290.0030.05717.91
5.5.280.0100.07020.76
5.5.270.0100.06720.79
5.5.260.0070.07320.97
5.5.250.0130.06720.62
5.5.240.0070.06720.27
5.4.450.0100.06719.56
5.4.440.0070.08319.48
5.4.430.0030.04719.24
5.4.420.0000.07319.46
5.4.410.0070.03719.48
5.4.400.0030.03718.94
5.4.390.0070.04019.00
5.4.380.0030.03719.16
5.4.370.0000.04319.14
5.4.360.0030.03719.07
5.4.350.0030.03719.24
5.4.340.0030.03719.26
5.4.320.0030.03718.84
5.4.310.0030.03718.85
5.4.300.0000.04019.14
5.4.290.0000.04019.11
5.4.280.0130.02719.23
5.4.270.0100.03319.23
5.4.260.0000.04019.23
5.4.250.0100.03019.23
5.4.240.0030.04319.23
5.4.230.0030.03719.13
5.4.220.0030.04318.97
5.4.210.0100.03019.13
5.4.200.0070.03319.23
5.4.190.0030.03719.13
5.4.180.0100.03019.13
5.4.170.0030.03718.83
5.4.160.0030.04719.12
5.4.150.0100.07318.95
5.4.140.0030.04016.60
5.4.130.0070.07016.54
5.4.120.0030.08016.55
5.4.110.0130.07016.46
5.4.100.0130.07016.34
5.4.90.0130.04716.32
5.4.80.0130.06016.44
5.4.70.0130.03016.50
5.4.60.0030.03716.50
5.4.50.0070.03316.46
5.4.40.0100.04316.38
5.4.30.0070.07316.35
5.4.20.0130.03716.36
5.4.10.0030.07316.27
5.4.00.0070.06015.78
5.3.290.0070.03314.55
5.3.280.0000.04014.62
5.3.270.0030.07714.66
5.3.260.0070.06014.51
5.3.250.0070.05714.60
5.3.240.0070.04014.59
5.3.230.0170.07014.59
5.3.220.0030.06314.58
5.3.210.0170.07014.55
5.3.200.0030.08314.58
5.3.190.0070.05714.57
5.3.180.0030.06714.70
5.3.170.0100.07014.57
5.3.160.0000.08014.56
5.3.150.0030.04014.61
5.3.140.0000.04314.59
5.3.130.0000.04714.61
5.3.120.0000.04014.57
5.3.110.0200.07014.57
5.3.100.0030.05714.05
5.3.90.0070.07714.02
5.3.80.0070.06714.09
5.3.70.0030.04714.09
5.3.60.0070.04314.15
5.3.50.0000.04013.96
5.3.40.0070.07314.10
5.3.30.0030.04313.96
5.3.20.0070.07713.72
5.3.10.0130.04013.68
5.3.00.0030.03713.71
5.2.170.0070.06311.21
5.2.160.0100.05311.09
5.2.150.0030.04011.14
5.2.140.0070.05011.18
5.2.130.0030.03711.18
5.2.120.0070.05711.10
5.2.110.0000.03311.09
5.2.100.0030.03011.13
5.2.90.0170.04711.05
5.2.80.0070.03011.10
5.2.70.0030.06711.25
5.2.60.0030.05310.99
5.2.50.0100.05711.05
5.2.40.0070.05711.07
5.2.30.0030.03311.03
5.2.20.0100.04311.03
5.2.10.0030.06010.88
5.2.00.0030.06010.71
5.1.60.0000.0379.90
5.1.50.0070.0339.84
5.1.40.0070.0279.99
5.1.30.0000.03010.32
5.1.20.0000.05010.39
5.1.10.0030.0539.97
5.1.00.0100.0439.99
5.0.50.0030.0238.54
5.0.40.0030.0408.57
5.0.30.0030.0508.14
5.0.20.0030.0278.34
5.0.10.0030.0308.17
5.0.00.0000.0578.21
4.4.90.0000.0337.94
4.4.80.0030.0207.94
4.4.70.0000.0377.94
4.4.60.0000.0377.94
4.4.50.0070.0237.94
4.4.40.0100.0477.94
4.4.30.0030.0137.94
4.4.20.0000.0207.94
4.4.10.0030.0277.94
4.4.00.0030.0577.94
4.3.110.0000.0407.94
4.3.100.0070.0307.94
4.3.90.0030.0137.94
4.3.80.0030.0337.94
4.3.70.0070.0307.94
4.3.60.0030.0277.94
4.3.50.0030.0337.94
4.3.40.0100.0477.94
4.3.30.0000.0377.94
4.3.20.0000.0377.94
4.3.10.0000.0377.94
4.3.00.0000.0177.94

preferences:
41.87 ms | 401 KiB | 5 Q