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] text here work!', $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.75
8.3.50.0130.00922.32
8.3.40.0000.01519.21
8.3.30.0030.01119.04
8.3.20.0000.00820.21
8.3.10.0080.00023.41
8.3.00.0090.00019.38
8.2.180.0120.00916.75
8.2.170.0040.01822.96
8.2.160.0100.00320.31
8.2.150.0080.00024.18
8.2.140.0060.01324.66
8.2.130.0110.00326.16
8.2.120.0080.00022.42
8.2.110.0100.00022.14
8.2.100.0000.01218.13
8.2.90.0030.00519.31
8.2.80.0050.00317.97
8.2.70.0100.00017.75
8.2.60.0000.00817.92
8.2.50.0040.00418.07
8.2.40.0030.00618.34
8.2.30.0040.00418.18
8.2.20.0090.00017.88
8.2.10.0030.00618.18
8.2.00.0030.00817.93
8.1.280.0130.00325.92
8.1.270.0080.00022.37
8.1.260.0070.00026.35
8.1.250.0040.00428.09
8.1.240.0080.00023.79
8.1.230.0080.00419.10
8.1.220.0050.00318.00
8.1.210.0000.00818.77
8.1.200.0000.00817.60
8.1.190.0050.00317.78
8.1.180.0050.00318.10
8.1.170.0040.00418.71
8.1.160.0000.00722.07
8.1.150.0040.00418.79
8.1.140.0000.00717.62
8.1.130.0050.00317.82
8.1.120.0070.00017.56
8.1.110.0000.00817.63
8.1.100.0020.00517.63
8.1.90.0000.00717.65
8.1.80.0000.00717.71
8.1.70.0000.00817.60
8.1.60.0030.00617.79
8.1.50.0080.00017.76
8.1.40.0040.00417.61
8.1.30.0000.00817.79
8.1.20.0040.00417.84
8.1.10.0040.00417.62
8.1.00.0000.00717.63
8.0.300.0040.00418.77
8.0.290.0000.00717.43
8.0.280.0030.00318.52
8.0.270.0050.00317.19
8.0.260.0000.00717.36
8.0.250.0030.00317.09
8.0.240.0030.00517.15
8.0.230.0040.00417.17
8.0.220.0070.00017.02
8.0.210.0050.00217.07
8.0.200.0000.00717.03
8.0.190.0000.00817.20
8.0.180.0030.00517.06
8.0.170.0000.00817.03
8.0.160.0000.00717.09
8.0.150.0050.00216.95
8.0.140.0000.00817.10
8.0.130.0060.00013.44
8.0.120.0030.00517.14
8.0.110.0000.00717.11
8.0.100.0040.00417.18
8.0.90.0100.00017.14
8.0.80.0130.00317.21
8.0.70.0000.00717.02
8.0.60.0000.00717.25
8.0.50.0020.00517.04
8.0.30.0110.00817.29
8.0.20.0120.00617.45
8.0.10.0050.00317.16
8.0.00.0090.00816.93
7.4.330.0000.00515.28
7.4.320.0030.00316.71
7.4.300.0000.00616.81
7.4.290.0000.00716.72
7.4.280.0060.00316.79
7.4.270.0030.00316.89
7.4.260.0080.00016.89
7.4.250.0040.00416.81
7.4.240.0050.00216.80
7.4.230.0030.00316.76
7.4.220.0090.01017.03
7.4.210.0090.00916.96
7.4.200.0040.00416.94
7.4.190.0040.00416.81
7.4.160.0120.00316.48
7.4.150.0110.00717.40
7.4.140.0090.01217.86
7.4.130.0080.01016.70
7.4.120.0090.01116.77
7.4.110.0030.01316.93
7.4.100.0160.00316.94
7.4.90.0110.01116.84
7.4.80.0120.00619.39
7.4.70.0140.00316.85
7.4.60.0090.00916.87
7.4.50.0030.00316.84
7.4.40.0000.01322.77
7.4.30.0030.01516.75
7.4.00.0060.00915.10
7.3.330.0060.00013.37
7.3.320.0050.00013.23
7.3.310.0020.00516.38
7.3.300.0000.00716.50
7.3.290.0100.00716.55
7.3.280.0110.00716.49
7.3.270.0040.01317.40
7.3.260.0110.00616.64
7.3.250.0090.01116.74
7.3.240.0110.00816.71
7.3.230.0140.00316.66
7.3.210.0090.00916.54
7.3.200.0070.01119.39
7.3.190.0070.01016.45
7.3.180.0100.00616.81
7.3.170.0080.00816.68
7.3.160.0080.00816.75
7.3.120.0030.00714.83
7.2.330.0100.00916.74
7.2.320.0080.00816.71
7.2.310.0130.00416.84
7.2.300.0080.00816.79
7.2.290.0110.00616.89
7.2.00.0060.00919.54
7.1.200.0030.00715.96
7.1.100.0000.01318.54
7.1.70.0000.00817.59
7.1.60.0000.02519.46
7.1.50.0040.01817.18
7.1.00.0030.07722.43
7.0.200.0090.00316.96
7.0.140.0070.06322.10
7.0.60.0170.07719.98
7.0.50.0100.03317.84
7.0.40.0170.07320.26
7.0.30.0100.04720.32
7.0.20.0330.04720.02
7.0.10.0170.08020.03
7.0.00.0000.04320.14
5.6.280.0070.07020.78
5.6.210.0030.09320.67
5.6.200.0130.07318.13
5.6.190.0070.08320.57
5.6.180.3200.04320.60
5.6.170.0270.05720.34
5.6.160.0030.07320.50
5.6.150.0070.08018.08
5.6.140.0070.06718.19
5.6.130.0200.06718.10
5.6.120.0130.08320.83
5.6.110.0000.07320.95
5.6.100.0030.04020.99
5.6.90.0030.08321.07
5.6.80.0130.06720.37
5.5.350.0200.04020.30
5.5.340.0070.08017.91
5.5.330.0100.05020.07
5.5.320.0300.03320.18
5.5.310.0370.06720.50
5.5.300.0100.04318.01
5.5.290.0130.07017.86
5.5.280.0130.07020.89
5.5.270.0000.04320.78
5.5.260.0070.07020.67
5.5.250.0130.07320.57
5.5.240.0230.02720.25
5.4.450.0270.04319.41
5.4.440.1200.03019.41
5.4.430.0930.03719.38
5.4.420.0970.04019.42
5.4.410.0930.04019.43
5.4.400.0770.04019.21
5.4.390.0870.04319.09
5.4.380.0430.05318.65
5.4.370.0370.05018.52
5.4.360.0370.05018.50
5.4.350.0330.06318.67
5.4.340.0430.05018.59
5.4.320.0120.03212.45
5.4.310.0100.03412.45
5.4.300.0070.03812.46
5.4.290.0080.03712.45
5.4.280.0130.05212.33
5.4.270.0150.07812.33
5.4.260.0040.05412.33
5.4.250.0030.05312.33
5.4.240.0150.05512.33
5.4.230.0120.05312.32
5.4.220.0250.08912.32
5.4.210.0230.05312.32
5.4.200.0210.07612.32
5.4.190.0150.05312.32
5.4.180.0060.07112.32
5.4.170.0140.07612.33
5.4.160.0480.07212.32
5.4.150.0090.06012.32
5.4.140.0170.05612.00
5.4.130.0100.05212.00
5.4.120.0110.05511.95
5.4.110.0150.07511.95
5.4.100.0130.07511.95
5.4.90.0130.05611.95
5.4.80.0350.12311.95
5.4.70.0170.07611.95
5.4.60.0140.05411.94
5.4.50.0100.04811.94
5.4.40.0150.07211.93
5.4.30.0140.08111.93
5.4.20.0410.09611.93
5.4.10.0110.04011.93
5.4.00.0120.05411.43
5.3.290.0100.03912.80
5.3.280.0120.04812.71
5.3.270.0380.05612.73
5.3.260.0100.05912.72
5.3.250.0110.04712.72
5.3.240.0170.05612.72
5.3.230.0170.06112.71
5.3.220.0160.06712.68
5.3.210.0100.04812.68
5.3.200.0080.04712.68
5.3.190.0070.04512.68
5.3.180.0050.04412.67
5.3.170.0080.04212.67
5.3.160.0090.04312.68
5.3.150.0080.05212.68
5.3.140.0160.07412.66
5.3.130.0060.05012.66
5.3.120.0110.04612.66
5.3.110.0100.04812.66
5.3.100.0050.04512.12
5.3.90.0160.04512.09
5.3.80.0100.05412.07
5.3.70.0060.05612.07
5.3.60.0090.05412.06
5.3.50.0130.06512.00
5.3.40.0140.04112.00
5.3.30.0230.10011.93
5.3.20.0280.05511.71
5.3.10.0280.06311.68
5.3.00.0100.04411.67
5.2.170.0040.0389.16
5.2.160.0110.0359.17
5.2.150.0120.0499.17
5.2.140.0110.0559.16
5.2.130.0080.0369.13
5.2.120.0160.0379.13
5.2.110.0080.0409.13
5.2.100.0090.0379.13
5.2.90.0110.0349.13
5.2.80.0090.0539.13
5.2.70.0080.0499.12
5.2.60.0110.0749.07
5.2.50.0100.0479.05
5.2.40.0090.0519.02
5.2.30.0180.0819.01
5.2.20.0150.0628.99
5.2.10.0290.0818.90
5.2.00.0170.0598.76
5.1.60.0080.0378.05
5.1.50.0070.0358.05
5.1.40.0080.0348.03
5.1.30.0030.0468.38
5.1.20.0050.0388.41
5.1.10.0120.0278.13
5.1.00.0030.0318.13
5.0.50.0060.0206.61
5.0.40.0060.0196.48
5.0.30.0100.0296.29
5.0.20.0050.0206.26
5.0.10.0060.0206.24
5.0.00.0060.0306.23
4.4.90.0030.0174.78
4.4.80.0040.0154.75
4.4.70.0050.0164.76
4.4.60.0040.0154.76
4.4.50.0100.0154.77
4.4.40.0030.0284.71
4.4.30.0040.0184.76
4.4.20.0070.0214.85
4.4.10.0030.0174.85
4.4.00.0010.0314.76
4.3.110.0040.0164.67
4.3.100.0070.0134.67
4.3.90.0040.0184.63
4.3.80.0020.0324.58
4.3.70.0060.0294.63
4.3.60.0050.0194.63
4.3.50.0030.0224.62
4.3.40.0090.0724.54
4.3.30.0080.0403.29
4.3.20.0010.0223.27
4.3.10.0080.0293.23
4.3.00.0100.01013.47

preferences:
39.99 ms | 401 KiB | 5 Q