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]; } } var_dump($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.0070.00716.88
8.3.50.0100.01322.11
8.3.40.0120.00318.92
8.3.30.0040.01119.27
8.3.20.0040.00420.21
8.3.10.0050.00323.52
8.3.00.0060.00319.50
8.2.180.0150.00616.88
8.2.170.0140.00322.96
8.2.160.0150.00020.43
8.2.150.0030.00624.18
8.2.140.0000.00724.66
8.2.130.0050.00326.16
8.2.120.0000.00822.34
8.2.110.0030.00622.23
8.2.100.0080.00318.05
8.2.90.0050.00319.22
8.2.80.0000.00817.97
8.2.70.0070.00317.88
8.2.60.0060.00317.93
8.2.50.0000.00918.07
8.2.40.0040.00418.34
8.2.30.0050.00318.32
8.2.20.0090.00017.89
8.2.10.0000.00718.13
8.2.00.0040.00717.87
8.1.280.0040.01425.92
8.1.270.0030.00622.11
8.1.260.0040.00426.35
8.1.250.0000.00728.09
8.1.240.0040.00423.76
8.1.230.0070.00419.34
8.1.220.0050.00317.91
8.1.210.0040.00418.77
8.1.200.0050.00517.73
8.1.190.0080.00017.76
8.1.180.0000.00818.10
8.1.170.0030.00618.84
8.1.160.0030.00622.11
8.1.150.0000.00818.80
8.1.140.0070.00317.61
8.1.130.0030.00317.87
8.1.120.0040.00417.64
8.1.110.0050.00317.55
8.1.100.0000.00717.63
8.1.90.0040.00417.70
8.1.80.0050.00317.53
8.1.70.0040.00417.62
8.1.60.0090.00317.75
8.1.50.0080.00017.68
8.1.40.0000.00717.61
8.1.30.0000.00817.80
8.1.20.0060.00317.82
8.1.10.0040.00417.81
8.1.00.0040.00417.59
8.0.300.0000.00718.77
8.0.290.0040.00417.04
8.0.280.0080.00018.41
8.0.270.0030.00317.34
8.0.260.0080.00017.33
8.0.250.0000.00717.10
8.0.240.0000.00617.12
8.0.230.0080.00017.11
8.0.220.0050.00217.07
8.0.210.0030.00316.96
8.0.200.0030.00317.16
8.0.190.0030.00517.08
8.0.180.0040.00417.02
8.0.170.0080.00017.08
8.0.160.0000.00716.94
8.0.150.0040.00416.93
8.0.140.0040.00416.99
8.0.130.0030.00313.55
8.0.120.0060.00317.11
8.0.110.0000.00717.16
8.0.100.0040.00416.98
8.0.90.0040.00417.18
8.0.80.0090.00617.11
8.0.70.0070.00016.97
8.0.60.0040.00416.99
8.0.50.0080.00017.14
8.0.30.0140.00617.19
8.0.20.0100.01217.42
8.0.10.0000.00717.31
8.0.00.0090.00817.04
7.4.330.0000.00515.06
7.4.320.0030.00316.81
7.4.300.0030.00316.79
7.4.290.0020.00516.81
7.4.280.0040.00716.88
7.4.270.0050.00216.96
7.4.260.0030.00316.80
7.4.250.0070.00016.87
7.4.240.0020.00516.84
7.4.230.0040.00416.76
7.4.220.0100.01616.77
7.4.210.0070.00916.94
7.4.200.0000.00716.93
7.4.190.0040.00416.73
7.4.160.0160.00616.75
7.4.150.0070.01117.40
7.4.140.0070.01017.86
7.4.130.0080.01216.73
7.4.120.0080.00916.98
7.4.110.0150.00316.89
7.4.100.0090.00916.86
7.4.90.0060.01216.66
7.4.80.0170.00019.39
7.4.70.0070.01616.84
7.4.60.0060.00916.58
7.4.50.0000.00816.61
7.4.40.0070.00722.77
7.4.30.0190.00016.88
7.4.00.0060.00915.38
7.3.330.0000.00613.48
7.3.320.0000.00513.35
7.3.310.0030.00516.41
7.3.300.0030.00316.52
7.3.290.0070.01516.46
7.3.280.0080.01016.53
7.3.270.0120.00617.40
7.3.260.0040.01416.82
7.3.250.0110.01316.71
7.3.240.0120.00616.81
7.3.230.0110.00616.71
7.3.210.0080.00816.88
7.3.200.0040.01419.39
7.3.190.0060.01216.62
7.3.180.0070.01016.60
7.3.170.0160.00016.61
7.3.160.0090.00916.76
7.3.120.0070.00715.20
7.3.10.0100.00716.55
7.3.00.0070.00316.83
7.2.330.0070.01416.81
7.2.320.0120.00616.89
7.2.310.0030.01816.71
7.2.300.0070.01116.77
7.2.290.0100.00616.82
7.2.130.0060.01017.05
7.2.120.0030.01216.98
7.2.110.0060.01317.18
7.2.100.0100.00317.13
7.2.90.0090.00617.06
7.2.80.0100.00717.34
7.2.70.0030.00717.20
7.2.60.0060.01017.21
7.2.50.0000.01416.94
7.2.40.0040.00717.30
7.2.30.0080.00617.21
7.2.20.0000.01216.98
7.2.10.0040.00717.17
7.2.00.0020.01118.36
7.1.250.0060.00616.07
7.1.200.0060.00615.97
7.1.100.0090.00417.95
7.1.70.0000.00917.14
7.1.60.0140.01019.46
7.1.50.0090.01516.86
7.1.00.0070.07322.43
7.0.200.0110.00616.61
7.0.140.0030.07321.97
7.0.60.0070.07319.98
7.0.50.0070.04317.68
7.0.40.0070.05020.15
7.0.30.0470.07020.20
7.0.20.0130.04720.14
7.0.10.0100.04320.11
7.0.00.0130.08320.14
5.6.280.0000.07721.09
5.6.210.0130.07320.71
5.6.200.0100.06718.21
5.6.190.0100.07320.49
5.6.180.0270.07320.61
5.6.170.0330.03320.62
5.6.160.0100.08020.71
5.6.150.0030.08318.18
5.6.140.0130.04318.11
5.6.130.0070.06718.11
5.6.120.0070.04320.98
5.6.110.0100.04720.89
5.6.100.0030.08320.88
5.6.90.0070.04021.10
5.6.80.0130.04720.41
5.6.70.4130.04020.52
5.5.350.0130.08320.40
5.5.340.0070.08018.02
5.5.330.0170.04020.21
5.5.320.0170.05720.30
5.5.310.0200.04020.15
5.5.300.0030.04717.91
5.5.290.0030.06018.02
5.5.280.0070.08320.96
5.5.270.0100.08020.76
5.5.260.0030.05020.75
5.5.250.0030.08320.58
5.5.240.0300.07020.05
5.4.450.0130.06019.46
5.4.440.0070.06719.26
5.4.430.0030.06319.55
5.4.420.0100.05319.30
5.4.410.0130.05718.96
5.4.400.0470.05319.14
5.4.390.0330.07018.77
5.4.380.0400.05018.76
5.4.370.0400.05718.52
5.4.360.0270.05718.78
5.4.350.0230.05018.59
5.4.340.0370.05718.63
5.4.320.0080.03912.45
5.4.310.0080.03612.45
5.4.300.0040.04712.45
5.4.290.0090.04212.45
5.4.280.0080.04112.33
5.4.270.0340.07012.33
5.4.260.0200.06812.33
5.4.250.0180.06512.33
5.4.240.0160.05412.33
5.4.230.0100.05112.32
5.4.220.0080.05212.32
5.4.210.0100.05012.32
5.4.200.0160.06912.32
5.4.190.0160.04512.32
5.4.180.0090.03612.32
5.4.170.0100.03512.33
5.4.160.0110.03512.33
5.4.150.0090.03812.32
5.4.140.0080.04812.01
5.4.130.0080.04611.99
5.4.120.0090.05611.95
5.4.110.0230.05711.95
5.4.100.0120.08011.95
5.4.90.0100.05811.95
5.4.80.0080.05511.95
5.4.70.0110.05411.95
5.4.60.0120.05411.95
5.4.50.0140.08611.95
5.4.40.0100.05211.93
5.4.30.0110.05611.93
5.4.20.0110.07211.93
5.4.10.0090.04611.93
5.4.00.0060.04211.42
5.3.290.0060.04212.80
5.3.280.0120.08612.71
5.3.270.0090.04312.73
5.3.260.0110.05012.72
5.3.250.0190.06212.72
5.3.240.0140.07612.71
5.3.230.0300.04712.71
5.3.220.0170.04612.68
5.3.210.0150.05712.68
5.3.200.0120.05412.68
5.3.190.0070.07712.68
5.3.180.0190.05812.67
5.3.170.0190.09112.67
5.3.160.0140.09112.68
5.3.150.0070.05812.68
5.3.140.0250.09312.66
5.3.130.0140.07812.66
5.3.120.0150.07012.66
5.3.110.0130.07312.66
5.3.100.0130.04812.12
5.3.90.0150.06012.09
5.3.80.0080.06912.07
5.3.70.0110.05212.07
5.3.60.0120.04012.07
5.3.50.0140.04712.00
5.3.40.0070.04112.00
5.3.30.0120.03011.94
5.3.20.0070.03711.72
5.3.10.0080.04111.68
5.3.00.0080.05011.67
5.2.170.0080.0729.16
5.2.160.0070.0309.16
5.2.150.0140.0469.17
5.2.140.0080.0559.16
5.2.130.0120.0429.12
5.2.120.0130.0549.13
5.2.110.0060.0389.13
5.2.100.0060.0449.13
5.2.90.0100.0459.13
5.2.80.0060.0539.12
5.2.70.0070.0359.12
5.2.60.0070.0329.07
5.2.50.0050.0339.04
5.2.40.0060.0309.03
5.2.30.0070.0309.00
5.2.20.0050.0338.99
5.2.10.0050.0358.90
5.2.00.0130.0388.76
5.1.60.0070.0498.05
5.1.50.0130.0378.05
5.1.40.0340.0628.03
5.1.30.0080.0438.38
5.1.20.0060.0358.40
5.1.10.0070.0348.13
5.1.00.0050.0368.13
5.0.50.0040.0226.62
5.0.40.0060.0206.48
5.0.30.0040.0326.29
5.0.20.0060.0206.26
5.0.10.0030.0236.24
5.0.00.0050.0336.23
4.4.90.0040.0204.78
4.4.80.0070.0204.75
4.4.70.0060.0144.75
4.4.60.0050.0154.76
4.4.50.0040.0164.77
4.4.40.0030.0314.71
4.4.30.0050.0264.76
4.4.20.0040.0204.85
4.4.10.0040.0184.84
4.4.00.0060.0244.76
4.3.110.0030.0214.67
4.3.100.0030.0174.66
4.3.90.0030.0154.63
4.3.80.0050.0234.59
4.3.70.0020.0154.63
4.3.60.0030.0154.62
4.3.50.0040.0154.63
4.3.40.0050.0254.53
4.3.30.0000.0183.29
4.3.20.0040.0193.27
4.3.10.0020.0223.23
4.3.00.0270.01710.30

preferences:
50.16 ms | 401 KiB | 5 Q