3v4l.org

run code in 300+ PHP versions simultaneously
<?php $pattern = '[a-z\d+#.-]+'; // Borrowed from @Hamza. $tags =<<<TAGS gggd hfhfghg;hfhdfh fgjfgjgf;hfhdfh;hfhdfh fgjgfj;hfhdfh;hfhdfh;hfhdfh hfhdfh;hfhdfh;hfhdfh;hfhdfh;hfhdfh hfhdfh;hfhdfh;hfhdfh;hfhdfh;hfhdfh;hfhdfh hfhdfh;hfhdfh;hfhdfh;hfhdfh;hfhdfh;hfhdfh;hfhdfh hfhdfh;hfhdfh;hfhdfh;hfhdfh;hfhdfh;hfhdfh;hfhdfh;hfhdfh TAGS; $prevChar = ''; $count = 0; $len = strlen($tags); $allowedChars = ';abcdefghijklmnopqrstuvwxyz0123456789#.-'; for ($i = 0; $i < $len; $i++) { $current = $tags[$i]; if ($current === ';' && $current !== $prevChar) { $count++; } else { $count = 0; break; } if (strpos($allowedChars, $current) === false) { $count = 0; break; } $prevChar = $current; } var_dump($count); if (preg_match('/'.$pattern.'/', $tags)) { var_dump(substr_count($tags, ';')); }

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.70.0160.00618.43
8.3.60.0120.00918.53
8.3.50.0110.00821.14
8.3.40.0120.00318.95
8.3.30.0070.00720.17
8.3.20.0040.00420.18
8.3.10.0040.00422.14
8.3.00.0070.00022.34
8.2.190.0090.01216.88
8.2.180.0130.00616.61
8.2.170.0070.00722.96
8.2.160.0030.01220.35
8.2.150.0050.00324.18
8.2.140.0000.00824.66
8.2.130.0140.00026.16
8.2.120.0090.00019.56
8.2.110.0000.01119.23
8.2.100.0030.00818.03
8.2.90.0000.00817.88
8.2.80.0090.00019.11
8.2.70.0030.00618.05
8.2.60.0000.00817.75
8.2.50.0100.00018.00
8.2.40.0050.00317.88
8.2.30.0040.00418.16
8.2.20.0040.00417.94
8.2.10.0000.00817.79
8.2.00.0020.00517.89
8.1.280.0060.01225.92
8.1.270.0030.00524.66
8.1.260.0000.00826.35
8.1.250.0050.00328.09
8.1.240.0030.00722.43
8.1.230.0080.00420.85
8.1.220.0050.00317.80
8.1.210.0040.00418.77
8.1.200.0040.00417.48
8.1.190.0030.00617.35
8.1.180.0040.00418.10
8.1.170.0020.00519.02
8.1.160.0050.00322.13
8.1.150.0040.00418.86
8.1.140.0050.00217.52
8.1.130.0070.00017.86
8.1.120.0030.00317.64
8.1.110.0000.00717.64
8.1.100.0040.00417.61
8.1.90.0000.00817.65
8.1.80.0040.00417.65
8.1.70.0030.00317.50
8.1.60.0060.00317.72
8.1.50.0060.00317.63
8.1.40.0080.00017.69
8.1.30.0030.00617.76
8.1.20.0000.00817.65
8.1.10.0060.00317.75
8.1.00.0000.00717.64
8.0.300.0000.00718.77
8.0.290.0080.00016.88
8.0.280.0000.00718.46
8.0.270.0040.00417.16
8.0.260.0030.00317.03
8.0.250.0030.00317.23
8.0.240.0030.00517.18
8.0.230.0040.00417.13
8.0.220.0040.00417.02
8.0.210.0030.00317.06
8.0.200.0000.00717.14
8.0.190.0070.00417.14
8.0.180.0080.00317.14
8.0.170.0050.00317.02
8.0.160.0070.00017.05
8.0.150.0040.00417.04
8.0.140.0080.00017.13
8.0.130.0050.00013.54
8.0.120.0000.00817.07
8.0.110.0000.00716.94
8.0.100.0000.00717.10
8.0.90.0080.00017.14
8.0.80.0130.00617.12
8.0.70.0000.00817.11
8.0.60.0070.00017.05
8.0.50.0000.00717.06
8.0.30.0120.00917.30
8.0.20.0120.00617.40
8.0.10.0000.00717.24
8.0.00.0060.01416.86
7.4.330.0030.00315.00
7.4.320.0030.00316.80
7.4.300.0030.00316.73
7.4.290.0030.00316.74
7.4.280.0000.00616.79
7.4.270.0000.00716.73
7.4.260.0030.00716.80
7.4.250.0030.00516.77
7.4.240.0030.00416.67
7.4.230.0000.00716.63
7.4.220.0160.00616.91
7.4.210.0090.00816.78
7.4.200.0000.00716.71
7.4.190.0000.00716.77
7.4.160.0030.01216.80
7.4.150.0100.00717.40
7.4.140.0080.01417.86
7.4.130.0110.00616.66
7.4.120.0070.01516.79
7.4.110.0130.00616.55
7.4.100.0180.00316.86
7.4.90.0160.00316.78
7.4.80.0150.00319.39
7.4.70.0100.01016.74
7.4.60.0030.01516.65
7.4.50.0080.00016.57
7.4.40.0040.01122.77
7.4.30.0030.01516.93
7.4.00.0060.01115.23
7.3.330.0030.00313.52
7.3.320.0000.00613.25
7.3.310.0050.00316.38
7.3.300.0040.00416.54
7.3.290.0120.00416.57
7.3.280.0070.01016.58
7.3.270.0060.01217.40
7.3.260.0070.01016.48
7.3.250.0090.01516.66
7.3.240.0070.01016.49
7.3.230.0070.01016.80
7.3.210.0040.01216.59
7.3.200.0120.00419.39
7.3.190.0200.00316.47
7.3.180.0080.00816.72
7.3.170.0110.00416.61
7.3.160.0090.00616.84
7.3.120.0100.00714.89
7.3.110.0060.01215.07
7.3.100.0080.00514.96
7.3.90.0090.00315.20
7.3.80.0040.01014.93
7.3.70.0100.00515.15
7.3.60.0080.00814.91
7.3.50.0020.00914.95
7.3.40.0080.00815.05
7.3.30.0020.01215.09
7.3.20.0070.00516.79
7.3.10.0060.00616.91
7.3.00.0020.01316.85
7.2.330.0070.01316.91
7.2.320.0100.01017.01
7.2.310.0080.00816.90
7.2.300.0070.01017.02
7.2.290.0170.00016.81
7.2.250.0100.01015.10
7.2.240.0030.01515.37
7.2.230.0040.01115.19
7.2.220.0080.00615.42
7.2.210.0110.00515.15
7.2.200.0090.00315.22
7.2.190.0050.00715.27
7.2.180.0070.00515.14
7.2.170.0080.00715.25
7.2.160.0120.00315.30
7.2.150.0040.01117.05
7.2.140.0070.01017.34
7.2.130.0060.01016.84
7.2.120.0100.00017.10
7.2.110.0070.00717.27
7.2.100.0040.00817.16
7.2.90.0030.01017.01
7.2.80.0040.01117.18
7.2.70.0060.00617.04
7.2.60.0090.00617.09
7.2.50.0000.00916.86
7.2.40.0030.01017.06
7.2.30.0070.01017.08
7.2.20.0040.01417.31
7.2.10.0000.01117.10
7.2.00.0050.00918.46
7.1.330.0030.01015.90
7.1.320.0050.00715.89
7.1.310.0050.00915.93
7.1.300.0000.01416.09
7.1.290.0060.00715.89
7.1.280.0070.00315.99
7.1.270.0100.00516.01
7.1.260.0060.00916.05
7.1.250.0120.00615.98
7.1.100.0000.01618.16
7.1.70.0060.00617.46
7.1.60.0030.00717.57
7.1.50.0040.00717.25
7.1.00.0030.04722.53
7.0.200.0000.02016.70
7.0.140.0070.09022.13
7.0.60.0070.04019.99
7.0.50.0070.07317.90
7.0.40.0070.08720.29
7.0.30.0270.06020.14
7.0.20.0230.05020.35
7.0.10.0030.07320.31
7.0.00.0070.04720.19
5.6.280.0030.07020.90
5.6.210.0070.07720.63
5.6.200.0230.07318.18
5.6.190.0070.08320.27
5.6.180.0370.06320.77
5.6.170.0200.03720.41
5.6.160.0030.06020.32
5.6.150.0070.07718.13
5.6.140.0030.08718.16
5.6.130.0100.06718.11
5.6.120.0100.04720.98
5.6.110.0030.08720.98
5.6.100.0030.04021.05
5.6.90.0030.04020.96
5.6.80.0030.08320.38
5.5.350.0030.06320.40
5.5.340.0070.08317.88
5.5.330.0030.08320.13
5.5.320.0400.06320.41
5.5.310.0300.07320.17
5.5.300.0070.08717.92
5.5.290.0030.06718.01
5.5.280.0070.08020.78
5.5.270.0030.04320.75
5.5.260.0130.05720.72
5.5.250.0100.06320.61
5.5.240.0200.04720.23
5.4.450.0200.04319.58
5.4.440.0400.05019.10
5.4.430.0870.04319.48
5.4.420.1500.03719.13
5.4.410.0500.05319.38
5.4.400.0230.03318.81
5.4.390.0400.07318.80
5.4.380.0300.05718.72
5.4.370.0100.05718.62
5.4.360.0370.06318.79
5.4.350.0470.06718.50
5.4.340.0400.07018.56
5.4.320.0060.03812.46
5.4.310.0080.04312.46
5.4.300.0090.04612.45
5.4.290.0080.05612.45
5.4.280.0120.03612.35
5.4.270.0040.04312.35
5.4.260.0080.03612.35
5.4.250.0070.05018.79
5.4.240.0070.05018.93
5.4.230.0070.05018.86
5.4.220.0070.05319.00
5.4.210.0070.05318.77
5.4.200.0130.04718.84
5.4.190.0200.06018.72
5.4.180.0100.05018.99
5.4.170.0070.05718.82
5.4.160.0130.05018.90
5.4.150.0130.07318.86
5.4.140.0030.05316.40
5.4.130.0070.07016.48
5.4.120.0070.05016.43
5.4.110.0130.05016.52
5.4.100.0030.07316.39
5.4.90.0070.04716.29
5.4.80.0130.06316.21
5.4.70.0070.06316.39
5.4.60.0070.04716.51
5.4.50.0070.05316.30
5.4.40.0100.04716.26
5.4.30.0200.03716.46
5.4.20.0070.04716.20
5.4.10.0130.04716.16
5.4.00.0170.04015.71
5.3.290.0060.04612.80
5.3.280.0130.04314.44
5.3.270.0030.06014.47
5.3.260.0130.05014.61
5.3.250.0100.04714.62
5.3.240.0100.04714.61
5.3.230.0130.06014.62
5.3.220.0100.04714.44
5.3.210.0030.05714.34
5.3.200.0070.05014.57
5.3.190.0070.05014.57
5.3.180.0100.05014.58
5.3.170.0130.06314.65
5.3.160.0030.05014.33
5.3.150.0070.05314.41
5.3.140.0070.05014.39
5.3.130.0070.05314.55
5.3.120.0230.04714.25
5.3.110.0030.05714.41
5.3.100.0100.04713.89
5.3.90.0030.05013.88
5.3.80.0030.05714.01
5.3.70.0130.05013.90
5.3.60.0070.04713.99
5.3.50.0100.04313.99
5.3.40.0070.05013.99
5.3.30.0000.05313.92
5.3.20.0100.04313.57
5.3.10.0000.05013.66
5.3.00.0130.04013.61
5.2.170.0100.05011.14
5.2.160.0030.05011.15
5.2.150.0030.04011.14
5.2.140.0000.04311.13
5.2.130.0030.04311.02
5.2.120.0070.04011.11
5.2.110.0000.04310.98
5.2.100.0130.03011.21
5.2.90.0030.04011.22
5.2.80.0030.04311.01
5.2.70.0070.03711.24
5.2.60.0070.05711.06
5.2.50.0100.04010.86
5.2.40.0070.04711.15
5.2.30.0170.03010.97
5.2.20.0070.05311.14
5.2.10.0100.04710.95
5.2.00.0130.03310.83
5.1.60.0030.03710.07
5.1.50.0070.0339.78
5.1.40.0030.0339.95
5.1.30.0070.03710.43
5.1.20.0030.03710.30
5.1.10.0070.03310.28
5.1.00.0030.04010.17
5.0.50.0070.0278.63
5.0.40.0070.0278.62
5.0.30.0030.0408.48
5.0.20.0070.0238.36
5.0.10.0030.0278.28
5.0.00.0000.0478.27
4.4.90.0070.0177.42
4.4.80.0070.0237.42
4.4.70.0030.0207.42
4.4.60.0000.0277.42
4.4.50.0030.0337.42
4.4.40.0100.0307.42
4.4.30.0030.0207.42
4.4.20.0000.0277.42
4.4.10.0030.0207.42
4.4.00.0070.0307.42
4.3.110.0000.0237.42
4.3.100.0030.0207.42
4.3.90.0070.0177.42
4.3.80.0000.0377.42
4.3.70.0030.0307.42
4.3.60.0030.0207.41
4.3.50.0030.0337.41
4.3.40.0030.0337.41
4.3.30.0070.0337.41
4.3.20.0030.0207.41
4.3.10.0030.0207.41
4.3.00.0070.01714.51

preferences:
41.74 ms | 401 KiB | 5 Q