3v4l.org

run code in 300+ PHP versions simultaneously
<html> <code> <pre> <?php $html = '[link href="http://www.google.com" title="Google" target="_blank"]Google[/link] [link href="http://www.google.com" title="Google" target="_blank"]Google[/link]sdfsdfs[link href="http://www.google.com" title="Google" target="_blank"]Google[/link] [link href="http://www.google.com" title="Google" target="_blank"]Google[/link]'; $regex = '#(?:.*?\[link|\G)\K(?:\s+([^=\s]+)=["\'](.*?)["\']|.*?\](.*?)\[/link\])#i'; preg_match_all($regex, $html, $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.0080.00817.00
8.3.50.0120.00822.20
8.3.40.0080.00819.18
8.3.30.0110.00319.17
8.3.20.0030.00520.34
8.3.10.0040.00423.65
8.3.00.0030.00619.63
8.2.180.0120.00918.31
8.2.170.0180.00422.96
8.2.160.0030.01020.70
8.2.150.0040.00424.18
8.2.140.0000.00824.66
8.2.130.0170.00326.16
8.2.120.0040.00422.25
8.2.110.0080.00022.36
8.2.100.0100.00318.03
8.2.90.0050.00319.35
8.2.80.0040.00418.03
8.2.70.0030.00617.75
8.2.60.0040.00417.93
8.2.50.0040.00418.07
8.2.40.0000.00818.28
8.2.30.0020.00518.25
8.2.20.0090.00018.04
8.2.10.0000.00718.31
8.2.00.0070.00417.98
8.1.280.0100.00625.92
8.1.270.0060.00323.65
8.1.260.0070.00326.35
8.1.250.0020.00528.09
8.1.240.0090.00023.98
8.1.230.0080.00319.22
8.1.220.0050.00317.91
8.1.210.0040.00418.77
8.1.200.0090.00017.60
8.1.190.0030.00517.78
8.1.180.0050.00318.10
8.1.170.0030.00618.74
8.1.160.0020.00522.08
8.1.150.0050.00318.90
8.1.140.0040.00417.71
8.1.130.0000.00717.96
8.1.120.0000.00717.55
8.1.110.0040.00417.63
8.1.100.0000.00817.65
8.1.90.0040.00417.70
8.1.80.0000.00717.64
8.1.70.0000.00717.64
8.1.60.0060.00317.77
8.1.50.0050.00317.75
8.1.40.0000.00817.72
8.1.30.0050.00317.66
8.1.20.0000.00817.79
8.1.10.0040.00417.76
8.1.00.0000.00717.59
8.0.300.0040.00418.77
8.0.290.0000.00917.29
8.0.280.0070.00018.56
8.0.270.0030.00317.25
8.0.260.0030.00317.33
8.0.250.0000.00717.15
8.0.240.0040.00317.11
8.0.230.0030.00317.19
8.0.220.0030.00317.14
8.0.210.0030.00316.96
8.0.200.0040.00417.09
8.0.190.0030.00517.05
8.0.180.0040.00417.13
8.0.170.0000.00916.98
8.0.160.0040.00417.07
8.0.150.0000.00917.13
8.0.140.0040.00417.04
8.0.130.0040.00413.45
8.0.120.0000.00817.02
8.0.110.0040.00417.14
8.0.100.0030.00517.09
8.0.90.0080.00017.17
8.0.80.0030.01317.14
8.0.70.0000.00717.10
8.0.60.0040.00417.21
8.0.50.0000.00717.05
8.0.30.0100.01017.46
8.0.20.0090.01117.40
8.0.10.0070.00017.12
8.0.00.0110.01116.95
7.4.330.0050.00015.17
7.4.320.0070.00016.84
7.4.300.0000.00616.93
7.4.290.0040.00416.82
7.4.280.0000.00716.77
7.4.270.0000.00716.73
7.4.260.0070.00016.87
7.4.250.0000.00816.88
7.4.240.0030.00516.88
7.4.230.0000.00716.75
7.4.220.0120.00616.97
7.4.210.0060.01116.82
7.4.200.0030.00316.95
7.4.190.0000.00816.95
7.4.160.0080.00816.80
7.4.150.0110.00717.40
7.4.140.0090.01217.86
7.4.130.0060.01116.86
7.4.120.0120.00716.89
7.4.110.0030.02116.95
7.4.100.0110.00816.88
7.4.90.0090.00916.89
7.4.80.0110.00819.39
7.4.70.0170.00316.82
7.4.60.0090.00916.83
7.4.50.0060.00316.64
7.4.40.0100.00622.77
7.4.30.0100.00716.66
7.4.00.0070.00715.41
7.3.330.0050.00013.27
7.3.320.0030.00313.36
7.3.310.0000.00816.61
7.3.300.0030.00316.43
7.3.290.0030.01016.48
7.3.280.0060.01116.50
7.3.270.0160.00317.40
7.3.260.0100.00716.55
7.3.250.0110.01016.71
7.3.240.0130.00616.63
7.3.230.0160.00616.70
7.3.210.0110.00816.83
7.3.200.0060.01619.39
7.3.190.0180.00016.74
7.3.180.0090.00616.69
7.3.170.0060.00916.77
7.3.160.0150.00316.53
7.3.120.0070.00715.02
7.2.330.0060.01216.90
7.2.320.0090.00916.87
7.2.310.0180.00016.84
7.2.300.0030.01416.86
7.2.290.0070.01017.02
7.2.00.0040.01119.23
7.1.100.0880.00616.30
7.1.70.0040.00417.46
7.1.60.0070.01619.46
7.1.50.0100.01417.18
7.1.00.0100.07022.38
7.0.200.0090.00617.00
7.0.140.0070.07022.18
7.0.60.0130.07720.04
7.0.50.0070.04017.70
7.0.40.0070.08320.09
7.0.30.0330.07320.11
7.0.20.0330.04720.03
7.0.10.0030.05720.32
7.0.00.0070.08320.02
5.6.280.0030.07021.02
5.6.210.0070.07320.59
5.6.200.0100.05018.12
5.6.190.0100.08020.60
5.6.180.0300.08720.27
5.6.170.0230.05320.49
5.6.160.0030.08720.48
5.6.150.0070.03718.09
5.6.140.0030.08718.21
5.6.130.0100.04318.07
5.6.120.0100.06721.09
5.6.110.0030.09320.93
5.6.100.0100.09020.98
5.6.90.0100.08721.00
5.6.80.0100.08020.37
5.6.70.3970.04020.41
5.5.350.0100.07720.41
5.5.340.0070.07718.02
5.5.330.0000.04720.43
5.5.320.0430.07320.51
5.5.310.0270.08320.29
5.5.300.0100.07317.95
5.5.290.0070.05317.95
5.5.280.0000.04720.87
5.5.270.0070.04020.93
5.5.260.0170.07320.88
5.5.250.0070.08320.47
5.5.240.0300.06720.12
5.4.450.0530.06719.55
5.4.440.0470.06019.32
5.4.430.0670.06319.60
5.4.420.0630.00019.47
5.4.410.0070.05718.96
5.4.400.0300.06018.65
5.4.390.0230.05318.77
5.4.380.0070.06018.53
5.4.370.0270.05318.70
5.4.360.0370.05018.78
5.4.350.0140.04311.98
5.4.340.0090.04411.97
5.4.320.0090.03412.46
5.4.310.0060.03812.46
5.4.300.0040.04412.46
5.4.290.0130.03412.46
5.4.280.0070.03612.35
5.4.270.0050.03912.35
5.4.260.0070.05612.35
5.4.250.0050.05412.35
5.4.240.0090.04212.35
5.4.230.0100.03412.34
5.4.220.0140.05112.34
5.4.210.0100.04812.34
5.4.200.0120.05512.34
5.4.190.0100.05012.34
5.4.180.0170.04712.34
5.4.170.0130.04712.35
5.4.160.0110.05112.34
5.4.150.0080.05912.34
5.4.140.0150.06512.02
5.4.130.0170.06312.01
5.4.120.0140.05511.97
5.4.110.0070.06011.97
5.4.100.0090.03311.97
5.4.90.0050.04411.97
5.4.80.0090.03611.96
5.4.70.0080.03511.96
5.4.60.0050.04811.96
5.4.50.0080.05711.96
5.4.40.0050.03911.95
5.4.30.0060.03711.95
5.4.20.0060.03911.95
5.4.10.0110.04411.95
5.4.00.0070.03611.45
5.3.290.0070.03812.80
5.3.280.0100.03512.71
5.3.270.0080.03912.72
5.3.260.0070.03812.71
5.3.250.0050.04712.71
5.3.240.0090.03512.72
5.3.230.0060.04112.71
5.3.220.0100.04012.68
5.3.210.0100.05112.68
5.3.200.0090.04912.68
5.3.190.0090.04512.68
5.3.180.0190.04912.68
5.3.170.0100.06112.67
5.3.160.0070.04012.67
5.3.150.0050.04012.67
5.3.140.0090.04212.66
5.3.130.0130.05612.66
5.3.120.0110.05212.66
5.3.110.0110.03712.66
5.3.100.0110.04912.12
5.3.90.0070.05212.09
5.3.80.0100.04912.07
5.3.70.0080.04912.08
5.3.60.0070.05112.06
5.3.50.0060.03612.01
5.3.40.0100.03412.00
5.3.30.0060.03711.97
5.3.20.0110.04511.75
5.3.10.0090.06311.71
5.3.00.0120.06111.70
5.2.170.0070.0479.20
5.2.160.0110.0479.20
5.2.150.0120.0429.20
5.2.140.0140.0449.20
5.2.130.0120.0499.16
5.2.120.0110.0399.16
5.2.110.0040.0429.16
5.2.100.0190.0479.16
5.2.90.0050.0489.16
5.2.80.0070.0449.16
5.2.70.0070.0449.16
5.2.60.0100.0419.11
5.2.50.0110.0659.07
5.2.40.0080.0459.06
5.2.30.0080.0479.03
5.2.20.0090.0419.01
5.2.10.0060.0308.92
5.2.00.0050.0308.78
5.1.60.0030.0398.06
5.1.50.0050.0368.06
5.1.40.0050.0378.04
5.1.30.0040.0388.39
5.1.20.0050.0278.41
5.1.10.0020.0288.14
5.1.00.0030.0368.14
5.0.50.0010.0296.63
5.0.40.0080.0256.49
5.0.30.0040.0356.30
5.0.20.0050.0236.28
5.0.10.0060.0296.25
5.0.00.0080.0376.25
4.4.90.0040.0184.78
4.4.80.0030.0194.75
4.4.70.0040.0214.75
4.4.60.0050.0224.75
4.4.50.0080.0244.77
4.4.40.0050.0324.71
4.4.30.0030.0224.76
4.4.20.0050.0214.84
4.4.10.0060.0214.85
4.4.00.0070.0314.76
4.3.110.0060.0174.66
4.3.100.0050.0214.67
4.3.90.0030.0174.63
4.3.80.0040.0274.58
4.3.70.0060.0154.63
4.3.60.0030.0174.62
4.3.50.0060.0154.63
4.3.40.0040.0274.54
4.3.30.0030.0163.30
4.3.20.0000.0193.28
4.3.10.0010.0193.23
4.3.00.0130.0238.10

preferences:
36.83 ms | 401 KiB | 5 Q