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]; $titlePattern = "/>.*?.kmz/"; preg_match($titlePattern, $bigKml, $titles); $title = $titles[0]; print_r($title); $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.0100.00718.29
8.3.50.0170.00722.16
8.3.40.0150.00319.09
8.3.30.0090.00619.03
8.3.20.0040.00420.18
8.3.10.0000.00823.52
8.3.00.0040.00419.63
8.2.180.0110.01116.49
8.2.170.0140.00022.96
8.2.160.0070.00720.57
8.2.150.0080.00024.18
8.2.140.0050.00224.66
8.2.130.0040.01126.16
8.2.120.0050.00322.20
8.2.110.0060.00322.23
8.2.100.0080.00417.91
8.2.90.0000.00819.09
8.2.80.0030.00617.97
8.2.70.0030.00617.88
8.2.60.0080.00018.16
8.2.50.0000.00818.10
8.2.40.0000.00818.22
8.2.30.0000.00818.03
8.2.20.0000.00817.78
8.2.10.0030.00519.93
8.2.00.0030.00717.85
8.1.280.0070.00725.92
8.1.270.0000.00823.89
8.1.260.0080.00026.35
8.1.250.0070.00028.09
8.1.240.0000.01022.66
8.1.230.0080.00317.76
8.1.220.0050.00317.74
8.1.210.0050.00318.77
8.1.200.0090.00017.47
8.1.190.0040.00417.35
8.1.180.0000.00818.10
8.1.170.0000.00818.78
8.1.160.0000.00722.07
8.1.150.0000.00818.71
8.1.140.0000.00717.71
8.1.130.0000.00717.86
8.1.120.0040.00417.50
8.1.110.0050.00217.65
8.1.100.0000.00817.55
8.1.90.0020.00517.63
8.1.80.0000.00817.61
8.1.70.0030.00317.56
8.1.60.0030.00617.75
8.1.50.0050.00317.59
8.1.40.0030.00517.69
8.1.30.0080.00017.72
8.1.20.0050.00317.85
8.1.10.0050.00217.73
8.1.00.0000.00817.70
8.0.300.0040.00418.77
8.0.290.0100.00316.58
8.0.280.0030.00318.48
8.0.270.0000.00717.19
8.0.260.0000.00617.18
8.0.250.0070.00016.99
8.0.240.0000.00717.11
8.0.230.0070.00017.10
8.0.220.0000.00716.99
8.0.210.0040.00416.97
8.0.200.0060.00016.96
8.0.190.0040.00417.15
8.0.180.0000.00716.98
8.0.170.0000.00817.08
8.0.160.0040.00417.14
8.0.150.0040.00416.93
8.0.140.0040.00417.02
8.0.130.0030.00313.42
8.0.120.0000.00716.90
8.0.110.0040.00416.99
8.0.100.0030.00616.87
8.0.90.0070.00017.08
8.0.80.0100.01316.93
8.0.70.0040.00417.05
8.0.60.0040.00417.11
8.0.50.0070.00017.07
8.0.30.0140.00517.31
8.0.20.0110.00817.40
8.0.10.0000.00717.19
8.0.00.0080.00817.01
7.4.330.0070.00015.00
7.4.320.0000.00616.85
7.4.300.0040.00416.73
7.4.290.0030.00316.71
7.4.280.0000.00716.71
7.4.270.0000.00716.82
7.4.260.0040.00416.72
7.4.250.0040.00416.72
7.4.240.0020.00516.79
7.4.230.0000.00716.57
7.4.220.0040.01316.67
7.4.210.0090.00616.75
7.4.200.0000.00716.56
7.4.190.0000.00716.71
7.4.160.0100.00616.75
7.4.150.0040.01317.40
7.4.140.0070.01017.86
7.4.130.0130.00716.60
7.4.120.0070.01416.74
7.4.110.0100.00816.84
7.4.100.0060.01616.67
7.4.90.0000.01716.63
7.4.80.0070.01119.39
7.4.70.0040.01216.96
7.4.60.0100.00616.64
7.4.50.0060.00316.61
7.4.40.0040.01122.77
7.4.30.0120.00616.70
7.4.00.0050.01315.00
7.3.330.0090.00013.21
7.3.320.0000.00513.27
7.3.310.0030.00316.54
7.3.300.0070.00016.48
7.3.290.0070.00716.38
7.3.280.0040.01116.45
7.3.270.0030.01417.40
7.3.260.0100.00716.74
7.3.250.0080.01016.52
7.3.240.0160.00316.93
7.3.230.0130.00316.86
7.3.210.0070.01016.81
7.3.200.0060.01619.39
7.3.190.0110.00716.49
7.3.180.0130.00316.39
7.3.170.0130.00316.91
7.3.160.0120.00416.59
7.3.120.0070.01214.96
7.3.110.0110.00714.93
7.3.100.0070.01015.20
7.3.90.0140.00315.24
7.3.80.0060.00615.02
7.3.70.0040.00814.97
7.3.60.0080.00515.09
7.3.50.0030.01014.85
7.3.40.0040.01115.09
7.3.30.0120.00315.08
7.3.20.0040.00716.96
7.3.10.0070.00716.95
7.3.00.0070.00717.02
7.2.330.0080.00816.79
7.2.320.0030.01316.73
7.2.310.0030.01316.80
7.2.300.0030.01716.71
7.2.290.0130.00616.94
7.2.250.0030.01215.31
7.2.240.0000.01715.00
7.2.230.0060.01215.36
7.2.220.0050.00515.40
7.2.210.0120.00415.11
7.2.200.0030.00615.22
7.2.190.0110.00415.19
7.2.180.0030.01615.30
7.2.170.0070.00715.27
7.2.00.0000.01319.86
7.1.330.0070.00716.02
7.1.320.0070.00716.20
7.1.310.0060.01016.14
7.1.300.0070.00716.16
7.1.290.0060.01316.22
7.1.280.0060.00315.98
7.1.270.0060.00316.05
7.1.260.0030.01415.98
7.1.200.0040.00815.97
7.1.100.0030.01018.07
7.1.70.0000.01017.52
7.1.60.0080.00819.33
7.1.50.0100.00316.93
7.1.00.0070.07322.30
7.0.200.0040.00717.10
7.0.140.0070.07322.15
7.0.100.0030.08720.03
7.0.90.0100.06719.88
7.0.80.0100.04719.95
7.0.70.0070.09320.05
7.0.60.0070.07020.09
7.0.50.0170.06720.26
7.0.40.0070.08020.03
7.0.30.0200.08019.95
7.0.20.0100.08719.95
7.0.10.0070.08019.99
7.0.00.0070.08720.18
5.6.280.0030.07320.90
5.6.250.0030.08020.61
5.6.240.0170.08020.69
5.6.230.0070.07720.52
5.6.220.0070.07020.73
5.6.210.0030.08320.66
5.6.200.0100.08320.94
5.6.190.0030.08320.99
5.6.180.0170.06721.10
5.6.170.0070.08021.13
5.6.160.0100.08321.05
5.6.150.0070.08720.95
5.6.140.0070.07721.00
5.6.130.0070.07321.09
5.6.120.0030.07321.16
5.6.110.0030.08720.95
5.6.100.0070.08020.96
5.6.90.0100.04321.02
5.6.80.0170.06320.47
5.6.70.0070.08320.39
5.6.60.0170.07020.30
5.6.50.0030.04320.39
5.6.40.0100.06320.40
5.6.30.0130.08720.43
5.6.20.0130.07320.43
5.6.10.0030.06720.43
5.6.00.0030.08320.30
5.5.380.0130.04720.46
5.5.370.0030.07020.33
5.5.360.0170.08320.48
5.5.350.0100.07720.34
5.5.340.0100.07720.77
5.5.330.0130.05320.78
5.5.320.0000.08720.73
5.5.310.0070.06320.75
5.5.300.0130.04320.80
5.5.290.0200.07020.90
5.5.280.0130.08020.83
5.5.270.0070.08720.85
5.5.260.0100.07020.75
5.5.250.0030.08020.63
5.5.240.0130.03320.03
5.5.230.0100.08020.30
5.5.220.0030.07720.29
5.5.210.0030.05020.26
5.5.200.0070.08720.14
5.5.190.0070.05720.16
5.5.180.0000.04720.21
5.5.160.0070.06720.08
5.5.150.0070.07720.23
5.5.140.0100.08020.10
5.5.130.0100.05720.10
5.5.120.0070.07720.11
5.5.110.0030.04720.25
5.5.100.0100.07720.02
5.5.90.0130.06020.04
5.5.80.0170.06020.11
5.5.70.0070.07019.96
5.5.60.0130.06719.96
5.5.50.0070.06320.13
5.5.40.0030.08719.96
5.5.30.0070.05020.08
5.5.20.0070.03720.13
5.5.10.0030.04320.05
5.5.00.0030.06320.01
5.4.450.0170.06019.57
5.4.440.0070.07719.50
5.4.430.0030.08719.17
5.4.420.0170.07019.48
5.4.410.0100.07719.06
5.4.400.0030.04318.85
5.4.390.0030.05019.04
5.4.380.0070.07319.21
5.4.370.0130.06718.87
5.4.360.0000.05018.90
5.4.350.0000.05718.87
5.4.340.0070.07319.10
5.4.320.0070.08019.12
5.4.310.0000.07019.23
5.4.300.0130.07019.04
5.4.290.0030.05319.22
5.4.280.0100.08019.21
5.4.270.0130.05019.15
5.4.260.0070.06318.94
5.4.250.0070.05019.08
5.4.240.0130.06318.99
5.4.230.0030.07719.04
5.4.220.0000.08018.84
5.4.210.0170.06719.22
5.4.200.0000.08318.86
5.4.190.0130.05018.94
5.4.180.0230.04719.11
5.4.170.0030.08318.93
5.4.160.0030.06718.92
5.4.150.0100.06319.21
5.4.140.0130.06316.27
5.4.130.0070.06716.48
5.4.120.0070.07016.47
5.4.110.0030.03716.56
5.4.100.0200.03316.55
5.4.90.0070.07016.56
5.4.80.0100.06316.51
5.4.70.0100.07016.47
5.4.60.0100.06716.48
5.4.50.0030.05316.48
5.4.40.0130.06316.51
5.4.30.0100.07016.43
5.4.20.0130.06716.23
5.4.10.0130.07316.46
5.4.00.0100.06015.87
5.3.290.0070.07314.78
5.3.280.0270.05714.58
5.3.270.0100.06014.58
5.3.260.0030.07314.65
5.3.250.0100.06014.57
5.3.240.0170.06014.55
5.3.230.0030.06314.71
5.3.220.0100.07014.61
5.3.210.0070.06714.65
5.3.200.0000.08014.62
5.3.190.0100.04014.54
5.3.180.0070.06714.61
5.3.170.0100.07014.69
5.3.160.0030.06014.56
5.3.150.0000.05014.68
5.3.140.0100.07314.50
5.3.130.0100.06314.59
5.3.120.0100.06314.63
5.3.110.0100.06714.52
5.3.100.0100.06314.03
5.3.90.0030.06014.02
5.3.80.0070.05314.13
5.3.70.0030.05714.13
5.3.60.0070.04013.91
5.3.50.0070.04714.00
5.3.40.0030.08013.86
5.3.30.0030.08014.04
5.3.20.0070.04313.82
5.3.10.0170.06313.77
5.3.00.0100.06013.53
5.2.170.0030.06312.30
5.2.160.0070.06712.30
5.2.150.0030.06312.30
5.2.140.0000.07312.30
5.2.130.0030.06312.30
5.2.120.0030.06312.30
5.2.110.0000.04712.30
5.2.100.0100.02712.30
5.2.90.0070.05012.30
5.2.80.0070.05012.30
5.2.70.0100.06012.30
5.2.60.0070.04012.30
5.2.50.0100.06012.30
5.2.40.0100.05312.30
5.2.30.0070.05712.30
5.2.20.0100.05312.30
5.2.10.0100.05312.30
5.2.00.0100.05712.30
5.1.60.0030.05012.30
5.1.50.0000.05312.30
5.1.40.0070.05012.30
5.1.30.0030.03012.30
5.1.20.0070.05012.30
5.1.10.0070.05312.30
5.1.00.0030.05712.30
5.0.50.0070.04012.30
5.0.40.0030.04012.30
5.0.30.0000.06712.30
5.0.20.0070.04012.30
5.0.10.0030.04012.30
5.0.00.0070.06012.30
4.4.90.0000.04012.30
4.4.80.0030.03312.30
4.4.70.0000.03312.30
4.4.60.0070.03012.30
4.4.50.0070.03012.30
4.4.40.0000.06012.30
4.4.30.0030.03312.30
4.4.20.0130.02312.30
4.4.10.0100.03312.30
4.4.00.0070.05012.30
4.3.110.0000.03712.30
4.3.100.0070.03012.30
4.3.90.0000.03712.30
4.3.80.0030.04012.30
4.3.70.0070.02012.30
4.3.60.0030.02712.30
4.3.50.0000.03312.30
4.3.40.0070.02312.30
4.3.30.0000.02012.30
4.3.20.0000.03712.30
4.3.10.0000.03012.30
4.3.00.0000.03012.30

preferences:
44.47 ms | 401 KiB | 5 Q