3v4l.org

run code in 300+ PHP versions simultaneously
<?php preg_match_all( '#(?:.*?\[link|\G)\K(?:\s+([^=\s]+)=["\'](.*?)["\']|.*?\](.*?)\[/link\])#i', 'ops [link href="http://www.google.com"]www.google.com[/link]', $matches, PREG_SET_ORDER); $links = array(); $reset = true; foreach($matches as $match) { if($reset) { $links[] = array( 'params' => array(), 'value' => null ); $reset = false; } end($links); $key = key($links); if(isset($match[3])) { $links[$key]['value'] = $match[3]; $reset = true; } else { $links[$key]['params'][$match[1]] = $match[2]; } } print_r($links);

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.0090.00916.88
8.3.50.0130.00522.09
8.3.40.0180.00019.09
8.3.30.0170.00319.09
8.3.20.0000.00820.16
8.3.10.0040.00423.60
8.3.00.0030.00619.63
8.2.180.0070.01116.63
8.2.170.0120.00622.96
8.2.160.0070.00720.22
8.2.150.0080.00024.18
8.2.140.0070.00024.66
8.2.130.0000.00826.16
8.2.120.0080.00022.33
8.2.110.0100.01022.37
8.2.100.0090.00318.09
8.2.90.0080.00019.30
8.2.80.0000.00818.05
8.2.70.0080.00017.88
8.2.60.0050.00317.93
8.2.50.0090.00018.07
8.2.40.0030.00618.41
8.2.30.0050.00318.19
8.2.20.0000.00817.93
8.2.10.0040.00418.23
8.2.00.0050.00517.94
8.1.280.0120.00325.92
8.1.270.0000.00822.27
8.1.260.0000.00926.35
8.1.250.0060.00328.09
8.1.240.0070.01723.92
8.1.230.0030.00719.07
8.1.220.0090.00017.91
8.1.210.0040.00418.77
8.1.200.0040.00417.61
8.1.190.0080.00017.75
8.1.180.0030.00618.10
8.1.170.0060.00318.84
8.1.160.0060.00322.07
8.1.150.0000.00718.95
8.1.140.0050.00217.75
8.1.130.0030.00317.99
8.1.120.0040.00417.69
8.1.110.0020.00517.64
8.1.100.0040.00417.63
8.1.90.0070.00017.63
8.1.80.0000.00817.54
8.1.70.0030.00317.49
8.1.60.0050.00617.73
8.1.50.0090.00017.68
8.1.40.0040.00417.74
8.1.30.0080.00017.83
8.1.20.0050.00317.84
8.1.10.0040.00417.75
8.1.00.0040.00417.55
8.0.300.0070.00018.77
8.0.290.0050.00217.43
8.0.280.0000.00818.55
8.0.270.0070.00017.23
8.0.260.0040.00417.32
8.0.250.0030.00317.04
8.0.240.0040.00417.16
8.0.230.0000.00717.16
8.0.220.0030.00317.13
8.0.210.0040.00417.14
8.0.200.0030.00317.13
8.0.190.0030.00617.14
8.0.180.0050.00317.07
8.0.170.0050.00217.07
8.0.160.0080.00017.14
8.0.150.0070.00017.14
8.0.140.0040.00417.04
8.0.130.0060.00013.41
8.0.120.0040.00417.00
8.0.110.0050.00217.03
8.0.100.0070.00017.02
8.0.90.0050.00217.21
8.0.80.0070.00717.21
8.0.70.0050.00317.15
8.0.60.0080.00017.16
8.0.50.0070.00017.18
8.0.30.0100.01117.21
8.0.20.0110.00817.40
8.0.10.0070.00017.18
8.0.00.0070.01516.93
7.4.330.0000.00515.24
7.4.320.0000.00716.81
7.4.300.0000.00616.80
7.4.290.0040.00416.72
7.4.280.0030.00716.90
7.4.270.0040.00416.83
7.4.260.0000.00816.95
7.4.250.0030.00516.78
7.4.240.0030.00416.82
7.4.230.0000.00716.80
7.4.220.0170.00016.98
7.4.210.0040.01216.92
7.4.200.0000.00716.85
7.4.190.0040.00416.84
7.4.160.0090.00616.62
7.4.150.0120.00617.40
7.4.140.0100.01017.86
7.4.130.0050.01216.91
7.4.120.0120.00516.83
7.4.110.0060.01116.89
7.4.100.0110.00816.70
7.4.90.0080.00916.64
7.4.80.0070.01119.39
7.4.70.0140.00316.68
7.4.60.0070.01016.68
7.4.50.0000.00416.67
7.4.40.0070.00722.77
7.4.30.0120.00916.80
7.4.00.0080.00815.09
7.3.330.0000.00613.36
7.3.320.0030.00313.21
7.3.310.0040.00416.45
7.3.300.0000.00716.46
7.3.290.0110.00816.54
7.3.280.0040.01216.52
7.3.270.0060.01117.40
7.3.260.0140.01116.80
7.3.250.0140.00716.66
7.3.240.0100.00616.59
7.3.230.0040.01216.73
7.3.210.0090.00916.71
7.3.200.0130.00919.39
7.3.190.0120.00616.64
7.3.180.0100.00716.53
7.3.170.0060.00916.61
7.3.160.0040.01216.58
7.3.120.0000.01315.07
7.2.330.0100.00716.72
7.2.320.0060.01117.01
7.2.310.0090.00916.79
7.2.300.0070.01016.90
7.2.290.0070.01016.73
7.2.00.0030.00919.80
7.1.200.0000.01115.80
7.1.100.0030.01018.10
7.1.70.0040.00417.59
7.1.60.0040.02219.46
7.1.50.0110.01117.11
7.1.00.0000.08022.54
7.0.200.0080.00416.61
7.0.140.0030.06722.00
7.0.90.0170.07720.04
7.0.80.0100.07319.87
7.0.70.0130.04020.14
7.0.60.0070.08019.98
7.0.50.0070.05320.33
7.0.40.0070.08720.19
7.0.30.0030.09020.09
7.0.20.0100.08320.09
7.0.10.0130.04319.99
7.0.00.0130.07320.00
5.6.280.0070.07020.86
5.6.230.0100.08020.59
5.6.220.0230.06720.61
5.6.210.0100.07320.71
5.6.200.0030.08321.04
5.6.190.0070.08321.11
5.6.180.0000.08021.07
5.6.170.0070.09021.02
5.6.160.0100.08321.11
5.6.150.0100.07721.06
5.6.140.0030.04320.91
5.6.130.0070.07721.05
5.6.120.0200.03021.03
5.6.110.0070.08320.92
5.6.100.0030.04721.02
5.6.90.0030.04321.03
5.6.80.0030.04020.42
5.6.70.0030.06720.43
5.6.60.0070.03720.38
5.6.50.0030.04320.39
5.6.40.0070.03320.43
5.6.30.0100.03320.47
5.6.20.0070.03720.30
5.6.10.0070.04320.52
5.6.00.0070.03320.32
5.5.370.0170.07320.54
5.5.360.0070.08720.41
5.5.350.0030.04720.37
5.5.340.0100.07320.88
5.5.330.0070.07720.73
5.5.320.0100.08320.89
5.5.310.0170.07020.79
5.5.300.0030.08720.82
5.5.290.0030.06320.64
5.5.280.0070.04020.92
5.5.270.0070.03720.81
5.5.260.0030.04020.81
5.5.250.0070.03720.73
5.5.240.0100.08020.11
5.5.230.0070.04020.14
5.5.220.0070.03720.16
5.5.210.0130.04320.11
5.5.200.0100.07320.25
5.5.190.0000.06020.09
5.5.180.0030.03319.99
5.5.160.0070.06320.21
5.5.150.0070.05020.23
5.5.140.0070.03720.22
5.5.130.0070.03719.98
5.5.120.0000.04020.11
5.5.110.0130.06319.98
5.5.100.0000.04320.01
5.5.90.0000.04320.09
5.5.80.0070.04020.15
5.5.70.0000.04320.08
5.5.60.0030.04020.11
5.5.50.0000.04019.93
5.5.40.0000.04020.08
5.5.30.0030.03320.08
5.5.20.0070.03020.04
5.5.10.0000.04019.96
5.5.00.0000.04020.05
5.4.450.0100.04719.54
5.4.440.0030.04719.27
5.4.430.0030.04019.22
5.4.420.0130.02719.45
5.4.410.0030.03719.24
5.4.400.0070.03319.09
5.4.390.0030.04019.05
5.4.380.0030.03719.17
5.4.370.0070.07019.00
5.4.360.0030.05719.14
5.4.350.0000.04019.12
5.4.340.0070.04319.14
5.4.320.0030.05319.04
5.4.310.0030.04019.04
5.4.300.0030.04319.13
5.4.290.0070.03718.90
5.4.280.0000.04319.22
5.4.270.0000.03719.04
5.4.260.0000.04319.04
5.4.250.0030.03719.13
5.4.240.0030.03718.87
5.4.230.0030.03719.11
5.4.220.0030.04719.22
5.4.210.0000.04019.20
5.4.200.0070.03319.16
5.4.190.0030.03718.86
5.4.180.0030.03718.86
5.4.170.0030.03719.14
5.4.160.0030.03718.85
5.4.150.0170.07019.02
5.4.140.0100.07316.50
5.4.130.0070.03716.49
5.4.120.0100.06316.49
5.4.110.0070.04716.52
5.4.100.0030.07716.54
5.4.90.0000.04716.34
5.4.80.0030.06016.46
5.4.70.0070.06716.42
5.4.60.0030.05016.48
5.3.290.0170.05314.65
5.3.280.0070.04314.64
5.3.270.0070.03014.57
5.3.260.0030.03714.71
5.3.250.0070.03714.61
5.3.240.0000.05014.66
5.3.230.0170.06714.57
5.3.220.0100.07314.49
5.3.210.0070.08314.59
5.3.200.0030.07714.62
5.3.190.0070.07714.55
5.3.180.0070.07314.68
5.3.170.0130.06314.56
5.3.160.0100.06714.62

preferences:
56.88 ms | 401 KiB | 5 Q