3v4l.org

run code in 300+ PHP versions simultaneously
<?php function AttrFromString($string) { preg_match_all('/(\S+)=["\']?((?:.(?!["\']?\s+(?:\S+)=|[>"\']))+.)["\']?|(\S+)/', $string, $matches); $newlist = array(); for($i = 0; $i < count($matches[0]); $i++) { if (!empty($matches[1][$i])) { array_push($newlist, array($matches[1][$i] , $matches[2][$i])); } else { if(!empty($matches[3][$i])) { array_push($newlist, array($matches[3][$i] , "")); } } } var_dump($newlist); } AttrFromString("test=hallo tes2=\"doei\" test3='lol' no-pe ja test='niks'");

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.0030.01616.75
8.3.50.0090.01022.20
8.3.40.0110.00718.92
8.3.30.0040.01119.19
8.3.20.0000.00820.38
8.3.10.0050.00223.61
8.3.00.0060.00319.50
8.2.180.0040.01618.51
8.2.170.0110.01122.96
8.2.160.0070.00720.48
8.2.150.0080.00024.18
8.2.140.0030.00624.66
8.2.130.0080.00026.16
8.2.120.0000.00722.38
8.2.110.0000.00921.06
8.2.100.0080.00418.16
8.2.90.0030.00619.30
8.2.80.0080.00017.97
8.2.70.0030.00617.88
8.2.60.0090.00018.03
8.2.50.0030.00518.22
8.2.40.0000.00820.43
8.2.30.0000.00719.42
8.2.20.0040.00417.93
8.2.10.0040.00418.20
8.2.00.0000.00817.98
8.1.280.0090.00625.92
8.1.270.0060.00323.84
8.1.260.0050.00326.35
8.1.250.0040.00428.09
8.1.240.0000.00923.92
8.1.230.0070.00419.06
8.1.220.0040.00417.74
8.1.210.0050.00318.77
8.1.200.0060.00317.25
8.1.190.0050.00317.60
8.1.180.0000.00820.37
8.1.170.0000.00818.90
8.1.160.0000.00819.00
8.1.150.0070.00020.21
8.1.140.0080.00017.70
8.1.130.0070.00017.86
8.1.120.0040.00417.55
8.1.110.0070.00317.51
8.1.100.0030.00517.59
8.1.90.0040.00417.55
8.1.80.0030.00417.54
8.1.70.0040.00417.52
8.1.60.0050.00317.76
8.1.50.0060.00317.57
8.1.40.0040.00417.60
8.1.30.0030.00517.61
8.1.20.0050.00317.81
8.1.10.0000.00817.79
8.1.00.0000.00817.57
8.0.300.0060.00318.77
8.0.290.0040.00417.00
8.0.280.0050.00218.50
8.0.270.0000.00717.23
8.0.260.0030.00317.31
8.0.250.0000.00817.05
8.0.240.0000.00817.18
8.0.230.0030.00717.15
8.0.220.0000.00817.11
8.0.210.0050.00316.98
8.0.200.0000.00817.15
8.0.190.0060.00317.00
8.0.180.0000.00817.11
8.0.170.0050.00317.06
8.0.160.0000.00717.14
8.0.150.0030.00517.02
8.0.140.0070.00017.04
8.0.130.0000.00613.54
8.0.120.0030.00617.19
8.0.110.0000.00817.12
8.0.100.0050.00217.01
8.0.90.0050.00317.25
8.0.80.0060.00917.07
8.0.70.0080.00017.05
8.0.60.0080.00017.13
8.0.50.0040.00417.09
8.0.30.0110.00917.32
8.0.20.0120.00717.40
8.0.10.0070.00017.23
8.0.00.0110.01016.85
7.4.330.0000.00515.24
7.4.320.0030.00316.91
7.4.300.0000.00616.91
7.4.290.0000.00716.79
7.4.280.0080.00016.83
7.4.270.0080.00016.79
7.4.260.0070.00016.73
7.4.250.0080.00016.79
7.4.240.0030.00516.80
7.4.230.0070.00016.94
7.4.220.0030.01516.89
7.4.210.0060.01016.79
7.4.200.0030.00316.61
7.4.190.0080.00016.72
7.4.160.0080.00816.70
7.4.150.0160.00317.40
7.4.140.0070.01317.86
7.4.130.0090.00916.71
7.4.120.0120.00616.80
7.4.110.0110.00816.73
7.4.100.0090.01216.70
7.4.90.0060.01316.65
7.4.80.0150.00919.39
7.4.70.0160.00316.75
7.4.60.0030.01316.76
7.4.50.0000.00816.83
7.4.40.0140.01016.56
7.4.30.0030.01416.71
7.4.00.0070.00714.91
7.3.330.0000.00613.41
7.3.320.0000.00513.55
7.3.310.0070.00016.47
7.3.300.0070.00016.41
7.3.290.0090.01016.54
7.3.280.0120.00516.56
7.3.270.0100.01017.40
7.3.260.0170.00916.74
7.3.250.0130.00716.58
7.3.240.0120.00616.66
7.3.230.0140.00616.64
7.3.210.0090.01016.60
7.3.200.0180.00619.39
7.3.190.0200.00416.61
7.3.180.0070.01016.45
7.3.170.0150.00016.55
7.3.160.0070.01016.63
7.3.120.0040.01415.07
7.2.330.0060.01217.01
7.2.320.0100.01316.82
7.2.310.0110.00916.88
7.2.300.0090.00916.91
7.2.290.0100.00716.96
7.2.00.0030.01019.59
7.1.100.0040.00718.18
7.1.70.0030.00517.51
7.1.60.0070.01819.46
7.1.50.0180.00735.12
7.1.00.0070.07322.47
7.0.200.0080.00016.77
7.0.140.0000.07721.95
7.0.70.0070.07321.69
7.0.60.0130.07721.87
7.0.50.0000.09322.05
7.0.40.0070.08020.18
7.0.30.0070.08719.95
7.0.20.0030.05720.04
7.0.10.0130.05020.12
7.0.00.0070.08320.12
5.6.280.0000.07720.86
5.6.220.0030.08720.53
5.6.210.0070.07020.57
5.6.200.0100.07321.04
5.6.190.0100.08321.08
5.6.180.0070.05321.04
5.6.170.0100.05320.97
5.6.160.0030.08021.11
5.6.150.0030.05321.17
5.6.140.0070.06321.04
5.6.130.0030.08021.05
5.6.120.0000.09020.98
5.6.110.0000.09021.17
5.6.100.0000.09021.10
5.6.90.0070.04321.00
5.6.80.0100.07720.47
5.6.70.0100.07320.34
5.6.60.0030.07720.31
5.6.50.0070.05720.41
5.6.40.0100.07320.44
5.6.30.0030.05020.47
5.6.20.0070.04720.27
5.6.10.0000.05320.43
5.6.00.0030.07720.45
5.5.360.0070.08720.39
5.5.350.0030.08320.34
5.5.340.0000.05320.84
5.5.330.0070.08720.87
5.5.320.0030.04720.87
5.5.310.0100.04720.76
5.5.300.0100.08020.84
5.5.290.0100.08320.79
5.5.280.0030.04720.76
5.5.270.0030.04320.85
5.5.260.0070.08720.82
5.5.250.0070.06020.68
5.5.240.0070.06020.16
5.5.230.0030.08720.11
5.5.220.0070.07020.30
5.5.210.0130.06720.26
5.5.200.0030.08020.11
5.5.190.0030.07320.23
5.5.180.0100.07720.11
5.5.160.0030.03720.15
5.5.150.0030.07019.95
5.5.140.0000.04720.14
5.5.130.0070.07320.14
5.5.120.0030.06720.13
5.5.110.0100.07020.07
5.5.100.0000.04020.12
5.5.90.0000.05720.08
5.5.80.0000.08320.17
5.5.70.0070.04720.02
5.5.60.0030.07720.08
5.5.50.0000.08020.09
5.5.40.0070.07320.05
5.5.30.0030.07320.05
5.5.20.0070.07320.05
5.5.10.0000.07019.98
5.5.00.0130.05720.11
5.4.450.0070.08019.18
5.4.440.0070.06319.16
5.4.430.0000.05319.27
5.4.420.0030.08019.53
5.4.410.0000.08019.32
5.4.400.0100.07319.16
5.4.390.0000.05718.94
5.4.380.0030.08319.09
5.4.370.0070.07019.03
5.4.360.0030.08019.14
5.4.350.0000.06019.04
5.4.340.0000.08319.14
5.4.320.0070.08019.14
5.4.310.0030.06719.18
5.4.300.0030.05319.03
5.4.290.0000.04019.16
5.4.280.0070.05019.20
5.4.270.0070.07318.84
5.4.260.0070.07318.98
5.4.250.0030.07719.02
5.4.240.0000.07019.17
5.4.230.0000.07719.23
5.4.220.0000.04718.87
5.4.210.0030.05019.04
5.4.200.0000.07719.02
5.4.190.0070.07318.93
5.4.180.0030.07318.84
5.4.170.0030.07719.14
5.4.160.0000.08019.12
5.4.150.0070.07719.12
5.4.140.0030.07316.20
5.4.130.0030.07716.42
5.4.120.0070.06716.44
5.4.110.0070.04716.35
5.4.100.0070.07716.48
5.4.90.0030.04316.32
5.4.80.0000.07016.27
5.4.70.0030.07016.37
5.4.60.0100.07016.41
5.4.50.0030.07716.36
5.4.40.0030.07016.41
5.4.30.0000.04316.41
5.4.20.0000.07716.29
5.4.10.0070.06716.39
5.4.00.0170.05015.78
5.3.290.0000.05314.80
5.3.280.0100.04314.55
5.3.270.0000.05714.63
5.3.260.0130.07314.58
5.3.250.0100.06714.64
5.3.240.0000.07714.57
5.3.230.0030.07714.61
5.3.220.0030.06314.59
5.3.210.0100.07314.60
5.3.200.0000.04714.57
5.3.190.0070.05714.63
5.3.180.0030.07314.62
5.3.170.0030.07714.54
5.3.160.0030.07714.66
5.3.150.0070.05314.67
5.3.140.0070.06014.58
5.3.130.0030.07314.54
5.3.120.0030.07714.64
5.3.110.0030.07714.54
5.3.100.0000.06314.07
5.3.90.0030.07313.99
5.3.80.0030.07313.95
5.3.70.0000.07314.16
5.3.60.0030.05014.06
5.3.50.0000.07313.96
5.3.40.0000.07314.03
5.3.30.0030.06013.84
5.3.20.0030.07013.70
5.3.10.0000.08013.66
5.3.00.0000.06313.53
5.2.170.0030.05712.25
5.2.160.0030.05012.25
5.2.150.0030.05712.25
5.2.140.0030.06712.25
5.2.130.0000.04712.25
5.2.120.0000.05012.25
5.2.110.0070.05712.25
5.2.100.0030.05012.25
5.2.90.0030.05712.25
5.2.80.0000.06012.25
5.2.70.0030.06312.25
5.2.60.0130.05312.25
5.2.50.0100.05312.25
5.2.40.0000.04712.25
5.2.30.0030.06712.25
5.2.20.0000.04012.25
5.2.10.0070.05312.25
5.2.00.0000.05712.25
5.1.60.0030.04312.25
5.1.50.0000.03312.25
5.1.40.0000.05312.25
5.1.30.0070.05712.25
5.1.20.0100.04312.25
5.1.10.0000.05712.25
5.1.00.0030.05312.25
5.0.50.0030.04312.25
5.0.40.0030.04312.25
5.0.30.0000.07012.25
5.0.20.0000.03712.25
5.0.10.0070.04012.25
5.0.00.0000.06712.25
4.4.90.0000.03312.25
4.4.80.0030.03012.25
4.4.70.0000.01712.25
4.4.60.0030.02012.25
4.4.50.0000.01712.25
4.4.40.0030.03712.25
4.4.30.0030.02312.25
4.4.20.0000.03712.25
4.4.10.0000.03312.25
4.4.00.0030.05312.25
4.3.110.0030.03312.25
4.3.100.0000.03312.25
4.3.90.0070.03012.25
4.3.80.0000.04012.25
4.3.70.0000.03012.25
4.3.60.0030.03312.25
4.3.50.0000.03712.25
4.3.40.0030.05012.25
4.3.30.0000.03712.25
4.3.20.0000.03712.25
4.3.10.0000.04012.25
4.3.00.0000.03312.25

preferences:
42.11 ms | 401 KiB | 5 Q