3v4l.org

run code in 300+ PHP versions simultaneously
<?php $pattern = "/(?<=href=(\"|'))[^\"']+(?=(\"|'))/"; $string = "<a class=\"hola\" href=\"link1\">Hola qué tal 1</a>"; $string .= "<a class=\'hola\' href=\'link2\'>Hola qué tal 2</a>"; $string .= "<a class=\"hola\" href=\"link3\">Hola qué tal 3</a>"; $string .= "<a class=\"hola\" href=\"link4\">Hola qué tal 4</a>"; $xml = simplexml_load_string($string); $list = $xml->xpath("//@href"); $preparedUrls = array(); foreach($list as $item) { $item = parse_url($item); $preparedUrls[] = $item['scheme'] . '://' . $item['host'] . '/'; } print_r($preparedUrls);

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.0040.01118.81
8.3.50.0090.01421.27
8.3.40.0090.00619.30
8.3.30.0110.00319.23
8.3.20.0110.00420.38
8.3.10.0040.00422.16
8.3.00.0040.00418.18
8.2.180.0150.00718.71
8.2.170.0090.00622.96
8.2.160.0070.00720.68
8.2.150.0050.00324.18
8.2.140.0040.00424.66
8.2.130.0080.00026.16
8.2.120.0060.00317.88
8.2.110.0070.00320.68
8.2.100.0100.00318.09
8.2.90.0080.00019.47
8.2.80.0090.00017.97
8.2.70.0000.00817.75
8.2.60.0070.00218.18
8.2.50.0030.00618.07
8.2.40.0030.00619.52
8.2.30.0000.00722.71
8.2.20.0060.00318.06
8.2.10.0050.00218.20
8.2.00.0070.00018.29
8.1.280.0000.01525.92
8.1.270.0100.01022.19
8.1.260.0000.00726.35
8.1.250.0000.00828.09
8.1.240.0000.01023.98
8.1.230.0040.00821.29
8.1.220.0040.00417.91
8.1.210.0000.00818.77
8.1.200.0050.00517.48
8.1.190.0050.00517.48
8.1.180.0040.00418.10
8.1.170.0000.00818.75
8.1.160.0000.00722.24
8.1.150.0000.00819.11
8.1.140.0040.00417.59
8.1.130.0030.00317.84
8.1.120.0000.00817.49
8.1.110.0070.00017.52
8.1.100.0000.00717.67
8.1.90.0000.00717.64
8.1.80.0030.00517.61
8.1.70.0080.00017.72
8.1.60.0090.00017.65
8.1.50.0080.00017.80
8.1.40.0040.00417.60
8.1.30.0040.00917.73
8.1.20.0000.00717.76
8.1.10.0000.00817.92
8.1.00.0040.00417.75
8.0.300.0000.00818.84
8.0.290.0080.00017.00
8.0.280.0070.00018.58
8.0.270.0030.00317.43
8.0.260.0000.00617.43
8.0.250.0070.00017.09
8.0.240.0070.00017.05
8.0.230.0070.00017.09
8.0.220.0070.00016.97
8.0.210.0070.00016.96
8.0.200.0030.00317.26
8.0.190.0030.00717.23
8.0.180.0000.00817.20
8.0.170.0050.00217.20
8.0.160.0050.00317.27
8.0.150.0040.00317.13
8.0.140.0040.00416.93
8.0.130.0030.00313.47
8.0.120.0100.00017.06
8.0.110.0050.00316.96
8.0.100.0030.00516.95
8.0.90.0030.00717.11
8.0.80.0030.01217.12
8.0.70.0040.00417.14
8.0.60.0000.00917.20
8.0.50.0070.00016.94
8.0.30.0090.00817.12
8.0.20.0100.00817.40
8.0.10.0040.00417.27
8.0.00.0110.00817.09
7.4.330.0020.00215.23
7.4.320.0030.00316.59
7.4.300.0030.00316.85
7.4.290.0000.00716.81
7.4.280.0000.00916.83
7.4.270.0000.00716.75
7.4.260.0030.00316.80
7.4.250.0030.00516.85
7.4.240.0030.00516.83
7.4.230.0030.00316.66
7.4.220.0190.00616.83
7.4.210.0100.00916.78
7.4.200.0000.00716.65
7.4.160.0060.01016.84
7.4.150.0130.00717.40
7.4.140.0080.01017.86
7.4.130.0110.00616.71
7.4.120.0090.00816.76
7.4.110.0060.01316.66
7.4.100.0060.01616.94
7.4.90.0090.00916.58
7.4.80.0060.01719.39
7.4.70.0090.01316.66
7.4.60.0130.00416.87
7.4.50.0000.00816.57
7.4.40.0130.00716.52
7.4.30.0110.00717.00
7.4.00.0040.00714.93
7.3.330.0030.00313.32
7.3.320.0050.00013.53
7.3.310.0000.00716.60
7.3.300.0020.00516.45
7.3.290.0000.00716.50
7.3.280.0100.00616.52
7.3.270.0070.01017.40
7.3.260.0120.00916.63
7.3.250.0070.01216.49
7.3.240.0150.00316.44
7.3.230.0070.01016.72
7.3.210.0150.00616.61
7.3.200.0100.00716.40
7.3.190.0060.01516.40
7.3.180.0060.01016.52
7.3.170.0060.00916.77
7.3.160.0130.00716.48
7.2.330.0070.01316.81
7.2.320.0100.00716.50
7.2.310.0100.00716.74
7.2.300.0040.01216.61
7.2.290.0040.01716.90
7.2.60.0090.00616.84
7.2.00.0100.00319.77
7.1.200.0090.00316.03
7.1.100.0040.00818.26
7.1.70.0030.00617.45
7.1.60.0090.00619.27
7.1.50.0090.01217.02
7.1.00.0070.07022.54
7.0.200.0050.00316.85
7.0.60.0030.09020.15
7.0.50.0070.07718.11
7.0.40.0130.08020.44
7.0.30.0300.05020.27
7.0.20.0170.06020.25
7.0.10.0000.09320.32
7.0.00.0100.07720.25
5.6.280.0000.03321.00
5.6.210.0030.06320.86
5.6.200.0130.03018.45
5.6.190.0100.09020.82
5.6.180.0300.07320.54
5.6.170.0200.04020.67
5.6.160.0070.08020.66
5.6.150.0030.08318.22
5.6.140.0030.04018.18
5.6.130.0070.05018.35
5.6.120.0030.08721.09
5.6.110.0070.07721.18
5.6.100.0170.07321.16
5.6.90.0070.04721.02
5.6.80.0070.05320.36
5.6.70.4470.03020.50
5.5.350.0200.08020.39
5.5.340.0170.05318.02
5.5.330.0030.04320.61
5.5.320.0230.07720.49
5.5.310.0270.05720.32
5.5.300.0070.04718.08
5.5.290.0170.04318.04
5.5.280.0030.06020.84
5.5.270.0130.07321.00
5.5.260.0100.08021.04
5.5.250.0130.05720.87
5.5.240.0370.03720.14
5.4.450.0630.07019.69
5.4.440.0670.06319.41
5.4.430.0700.05719.53
5.4.420.0770.06719.47
5.4.410.0730.07019.41
5.4.400.0830.05019.33
5.4.390.0770.06019.21
5.4.380.0730.05719.21
5.4.370.0670.05719.35
5.4.360.0600.06719.21
5.4.350.0730.05719.10
5.4.340.0700.06019.22
5.4.320.0900.05019.10
5.4.310.0770.05019.36
5.4.300.0670.05319.34
5.4.290.0730.07019.21
5.4.280.0800.05019.20
5.4.270.0800.06019.30
5.4.260.0630.06319.38
5.4.250.0770.05319.09
5.4.240.0830.05019.32
5.4.230.0930.06719.20
5.4.220.0900.05019.34
5.4.210.0870.06319.04
5.4.200.0630.05719.37
5.4.190.0770.05019.21
5.4.180.0870.04319.00
5.4.170.0900.07019.39
5.4.160.0770.05019.06
5.4.150.0900.05319.32
5.4.140.0730.06016.61
5.4.130.0900.04716.49
5.4.120.0800.04716.51
5.4.110.0830.04316.63
5.4.100.0700.05316.72
5.4.90.0700.04316.64
5.4.80.0900.05716.63
5.4.70.0070.06316.61
5.4.60.0130.07316.61
5.4.50.0170.04016.57
5.4.40.0170.03316.61
5.4.30.0400.06316.38
5.4.20.0230.03316.50

preferences:
44.86 ms | 401 KiB | 5 Q