3v4l.org

run code in 300+ PHP versions simultaneously
<?php function AttrFromString($string) { preg_match_all('/(\S+)=["\']?((?:.(?!["\']?\s+(?:\S+)=|[>"\']))+.)["\']?|(\S+)/', $string, $matches); $newlist = array(); foreach($matches[0] as $yes) { if (strpos($yes, "=")!==false) { $as = explode('=', $yes); } array_push($newlist, array($as[0]. $as[1])); } 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.0000.01516.75
8.3.50.0120.00718.30
8.3.40.0040.01118.89
8.3.30.0100.00718.93
8.3.20.0030.00518.91
8.3.10.0060.00320.69
8.3.00.0080.00019.50
8.2.180.0100.00725.92
8.2.170.0140.00719.21
8.2.160.0150.00322.96
8.2.150.0150.00325.66
8.2.140.0030.00624.66
8.2.130.0070.00026.16
8.2.120.0060.00318.88
8.2.110.0060.00321.04
8.2.100.0090.00317.97
8.2.90.0060.00319.47
8.2.80.0000.00719.33
8.2.70.0070.00317.74
8.2.60.0000.00918.05
8.2.50.0050.00318.07
8.2.40.0080.00018.47
8.2.30.0040.00718.20
8.2.20.0030.00719.64
8.2.10.0040.00418.04
8.2.00.0030.00517.99
8.1.280.0070.00725.92
8.1.270.0040.01124.66
8.1.260.0000.00826.35
8.1.250.0000.00728.09
8.1.240.0000.01022.55
8.1.230.0110.00020.86
8.1.220.0050.00317.91
8.1.210.0000.00919.00
8.1.200.0060.00617.36
8.1.190.0000.00717.52
8.1.180.0080.00018.10
8.1.170.0000.00818.75
8.1.160.0080.00418.91
8.1.150.0020.00518.86
8.1.140.0050.00317.75
8.1.130.0000.00817.93
8.1.120.0090.00017.59
8.1.110.0000.00817.47
8.1.100.0030.00417.68
8.1.90.0000.00717.62
8.1.80.0030.00517.54
8.1.70.0030.00317.61
8.1.60.0060.00317.80
8.1.50.0000.00817.46
8.1.40.0040.00417.65
8.1.30.0000.00817.64
8.1.20.0000.00817.65
8.1.10.0080.00017.75
8.1.00.0040.00417.69
8.0.300.0000.00720.02
8.0.290.0040.00416.88
8.0.280.0050.00318.49
8.0.270.0000.00716.86
8.0.260.0070.00017.09
8.0.250.0000.00717.02
8.0.240.0030.00817.00
8.0.230.0070.00016.99
8.0.220.0040.00417.09
8.0.210.0050.00216.96
8.0.200.0000.00717.12
8.0.190.0030.00317.07
8.0.180.0050.00217.08
8.0.170.0030.00617.10
8.0.160.0040.00417.02
8.0.150.0040.00416.91
8.0.140.0000.00717.08
8.0.130.0030.00313.44
8.0.120.0090.00017.04
8.0.110.0030.00317.02
8.0.100.0080.00016.92
8.0.90.0080.00017.07
8.0.80.0030.01617.16
8.0.70.0000.00817.14
8.0.60.0040.00417.06
8.0.50.0030.00617.23
8.0.30.0060.01217.49
8.0.20.0100.01017.30
8.0.10.0040.00417.09
8.0.00.0120.00817.03
7.4.330.0000.00513.18
7.4.320.0060.00016.82
7.4.300.0070.00016.91
7.4.290.0000.00816.78
7.4.280.0000.00816.90
7.4.270.0000.00716.80
7.4.260.0050.00013.51
7.4.250.0030.00516.78
7.4.240.0070.00016.91
7.4.230.0030.00316.79
7.4.220.0060.01316.79
7.4.210.0110.00316.76
7.4.200.0050.00216.71
7.4.190.0050.00216.79
7.4.160.0070.01016.77
7.4.150.0160.00616.75
7.4.140.0070.01016.68
7.4.130.0130.01016.75
7.4.120.0060.01216.86
7.4.110.0070.01116.77
7.4.100.0160.00916.77
7.4.90.0080.01516.59
7.4.80.0140.00419.39
7.4.70.0120.00916.73
7.4.60.0160.00016.81
7.4.50.0060.00316.54
7.4.40.0080.00816.44
7.4.30.0090.00916.78
7.4.00.0070.00715.32
7.3.330.0000.00613.46
7.3.320.0000.00513.40
7.3.310.0040.00416.46
7.3.300.0040.00416.34
7.3.290.0050.00816.37
7.3.280.0130.00616.43
7.3.270.0140.00516.45
7.3.260.0090.01516.59
7.3.250.0100.00816.46
7.3.240.0140.00316.80
7.3.230.0140.00716.83
7.3.210.0030.01416.74
7.3.200.0060.01316.63
7.3.190.0110.00716.75
7.3.180.0060.01216.57
7.3.170.0070.01016.80
7.3.160.0070.01016.73
7.3.120.0110.00414.94
7.2.330.0120.00616.87
7.2.320.0120.01216.88
7.2.310.0130.01216.80
7.2.300.0060.01216.88
7.2.290.0060.01116.70
7.2.00.0030.00919.31
7.1.70.0030.00517.40
7.1.60.0070.00717.46
7.1.50.0030.00916.96
7.1.00.0030.06022.56
7.0.200.0040.01116.96
7.0.140.0070.07021.95
7.0.120.0070.06322.01
7.0.60.0000.08721.82
7.0.50.0100.03317.88
7.0.40.0030.04720.20
7.0.30.0430.05720.36
7.0.20.0300.08320.20
7.0.10.0000.06020.21
7.0.00.0030.09320.24
5.6.280.0070.06721.06
5.6.210.0000.06020.47
5.6.200.0100.08018.24
5.6.190.0000.09320.61
5.6.180.0170.04720.63
5.6.170.0470.06020.55
5.6.160.0070.04320.54
5.6.150.0070.06718.19
5.6.140.0070.07718.15
5.6.130.0070.08718.19
5.6.120.0070.05020.90
5.6.110.0070.08721.11
5.6.100.0100.07320.96
5.6.90.0130.05721.12
5.6.80.0000.04320.38
5.5.350.0100.07320.53
5.5.340.0070.03717.99
5.5.330.0100.07020.19
5.5.320.0230.04020.29
5.5.310.0200.05020.36
5.5.300.0030.04317.93
5.5.290.0030.04017.96
5.5.280.0130.07320.80
5.5.270.0000.04720.87
5.5.260.0100.07020.84
5.5.250.0100.03720.61
5.5.240.0100.03320.23
5.4.450.0100.07719.18
5.4.440.0100.08019.18
5.4.430.0130.07319.56
5.4.420.0000.05719.25
5.4.410.0030.07719.18
5.4.400.0100.06718.86
5.4.390.0230.06018.86
5.4.380.0000.06718.98
5.4.370.0030.04319.15
5.4.360.0070.08319.01
5.4.350.0070.05318.94
5.4.340.0070.04019.27
5.4.320.0030.04019.08
5.4.310.0070.07018.86
5.4.300.0100.06718.87
5.4.290.0170.04318.97
5.4.280.0030.08319.11
5.4.270.0130.07018.87
5.4.260.0070.04718.87
5.4.250.0070.05019.07
5.4.240.0000.06318.95
5.4.230.0100.03719.23
5.4.220.0030.05718.96
5.4.210.0170.06319.00
5.4.200.0100.05719.23
5.4.190.0030.07018.86
5.4.180.0030.08318.83
5.4.170.0070.07019.23
5.4.160.0070.03719.16
5.4.150.0070.08319.13
5.4.140.0030.06716.40
5.4.130.0000.07716.46
5.4.120.0100.07316.51
5.4.110.0100.05016.29
5.4.100.0070.04316.30
5.4.90.0130.06716.30
5.4.80.0100.05316.29
5.4.70.0130.05316.44
5.4.60.0030.07016.32
5.4.50.0030.05016.25
5.4.40.0100.06716.44
5.4.30.0070.07316.25
5.4.20.0070.07316.40
5.4.10.0070.03316.40
5.4.00.0030.05315.79
5.3.290.0100.06314.81
5.3.280.0130.03314.74
5.3.270.0130.07014.64
5.3.260.0030.04314.65
5.3.250.0000.04314.61
5.3.240.0000.08014.68
5.3.230.0030.06314.63
5.3.220.0030.07714.61
5.3.210.0070.04714.64
5.3.200.0070.06714.71
5.3.190.0130.07314.58
5.3.180.0070.06714.59
5.3.170.0130.03314.72
5.3.160.0100.07014.45
5.3.150.0070.06314.72
5.3.140.0070.07714.45
5.3.130.0070.04714.55
5.3.120.0070.08014.56
5.3.110.0100.07014.48
5.3.100.0030.06014.09
5.3.90.0070.07014.06
5.3.80.0070.04714.05
5.3.70.0100.05014.06
5.3.60.0130.03714.15
5.3.50.0070.07313.95
5.3.40.0070.07314.09
5.3.30.0070.07014.07
5.3.20.0030.08313.69
5.3.10.0100.03013.63
5.3.00.0130.06013.70
5.2.170.0070.06311.20
5.2.160.0170.04311.16
5.2.150.0070.06011.03
5.2.140.0070.06011.09
5.2.130.0070.04711.16
5.2.120.0000.03711.10
5.2.110.0070.02711.14
5.2.100.0030.03011.05
5.2.90.0100.06011.02
5.2.80.0070.05311.15
5.2.70.0070.04311.06
5.2.60.0100.05711.02
5.2.50.0130.05311.02
5.2.40.0000.07011.05
5.2.30.0000.06311.05
5.2.20.0130.05710.98
5.2.10.0000.03710.89
5.2.00.0070.06010.76
5.1.60.0030.05310.00
5.1.50.0030.0409.97
5.1.40.0070.03310.13
5.1.30.0000.03010.35
5.1.20.0000.03010.50
5.1.10.0000.05010.05
5.1.00.0070.05310.21
5.0.50.0000.0238.55
5.0.40.0030.0308.46
5.0.30.0000.0538.46
5.0.20.0070.0378.46
5.0.10.0000.0238.46
5.0.00.0070.0638.46
4.4.90.0000.0378.46
4.4.80.0070.0208.46
4.4.70.0030.0238.46
4.4.60.0030.0338.46
4.4.50.0070.0178.46
4.4.40.0000.0608.46
4.4.30.0000.0238.46
4.4.20.0000.0178.46
4.4.10.0000.0308.46
4.4.00.0000.0438.46
4.3.110.0030.0208.46
4.3.100.0030.0178.46
4.3.90.0030.0338.46
4.3.80.0000.0278.46
4.3.70.0030.0278.46
4.3.60.0070.0308.46
4.3.50.0030.0238.46
4.3.40.0030.0278.46
4.3.30.0000.0208.46
4.3.20.0000.0378.46
4.3.10.0000.0378.46
4.3.00.0100.0178.46

preferences:
50.9 ms | 401 KiB | 5 Q