3v4l.org

run code in 300+ PHP versions simultaneously
<?php $pattern = '[a-z\d+#.-]+'; // Borrowed from @Hamza. $tags =<<<TAGS gg!!gd 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.0070.01416.61
8.3.60.0110.01118.68
8.3.50.0090.01021.09
8.3.40.0090.00618.86
8.3.30.0110.00420.34
8.3.20.0080.00020.33
8.3.10.0050.00322.14
8.3.00.0080.00022.21
8.2.180.0140.00716.75
8.2.170.0150.00022.96
8.2.160.0140.00020.39
8.2.150.0050.00324.18
8.2.140.0100.01024.66
8.2.130.0110.00726.16
8.2.120.0000.00919.51
8.2.110.0050.00519.39
8.2.100.0090.00317.88
8.2.90.0040.00419.21
8.2.80.0000.00817.97
8.2.70.0050.00517.75
8.2.60.0000.00817.93
8.2.50.0030.00618.07
8.2.40.0040.00420.01
8.2.30.0000.00818.16
8.2.20.0050.00317.87
8.2.10.0000.00917.96
8.2.00.0060.00317.95
8.1.280.0100.01025.92
8.1.270.0040.00424.66
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0080.00022.19
8.1.230.0030.00917.76
8.1.220.0030.00517.76
8.1.210.0040.00418.77
8.1.200.0090.00017.48
8.1.190.0000.00817.35
8.1.180.0040.00418.10
8.1.170.0040.00418.76
8.1.160.0050.00322.04
8.1.150.0090.00018.66
8.1.140.0040.00417.55
8.1.130.0000.00717.96
8.1.120.0030.00317.53
8.1.110.0070.00017.59
8.1.100.0050.00217.52
8.1.90.0040.00417.65
8.1.80.0040.00417.51
8.1.70.0040.00417.58
8.1.60.0000.01017.72
8.1.50.0050.00217.57
8.1.40.0000.00817.55
8.1.30.0040.00417.76
8.1.20.0050.00317.70
8.1.10.0040.00417.75
8.1.00.0040.00417.61
8.0.300.0070.00018.77
8.0.290.0020.00517.00
8.0.280.0030.00318.32
8.0.270.0000.00817.20
8.0.260.0030.00316.98
8.0.250.0030.00317.20
8.0.240.0030.00617.04
8.0.230.0030.00317.04
8.0.220.0040.00417.01
8.0.210.0000.00716.99
8.0.200.0030.00317.17
8.0.190.0030.00717.18
8.0.180.0040.00417.05
8.0.170.0000.00817.15
8.0.160.0000.00716.96
8.0.150.0080.00017.00
8.0.140.0030.00616.95
8.0.130.0000.00513.49
8.0.120.0040.00417.00
8.0.110.0040.00417.03
8.0.100.0000.00717.00
8.0.90.0000.00716.99
8.0.80.0060.01017.15
8.0.70.0040.00417.09
8.0.60.0000.00716.99
8.0.50.0020.00517.16
8.0.30.0150.00317.12
8.0.20.0080.01117.49
8.0.10.0000.00717.05
8.0.00.0180.00317.00
7.4.330.0060.00015.02
7.4.320.0030.00316.83
7.4.300.0030.00316.88
7.4.290.0030.00516.74
7.4.280.0040.00416.72
7.4.270.0000.00616.86
7.4.260.0030.00316.79
7.4.250.0040.00416.79
7.4.240.0070.00016.74
7.4.230.0070.00016.61
7.4.220.0130.01316.78
7.4.210.0090.00816.82
7.4.200.0000.00716.91
7.4.190.0030.00616.86
7.4.160.0150.00016.84
7.4.150.0150.00317.40
7.4.140.0100.00817.86
7.4.130.0070.01116.84
7.4.120.0070.01016.61
7.4.110.0090.00616.79
7.4.100.0070.01016.55
7.4.90.0140.00316.97
7.4.80.0030.01519.39
7.4.70.0140.00416.59
7.4.60.0090.01516.80
7.4.50.0030.00316.69
7.4.40.0090.00622.77
7.4.30.0120.01216.72
7.4.10.0100.01016.74
7.4.00.0070.01116.05
7.3.330.0030.00313.30
7.3.320.0030.00313.25
7.3.310.0040.00316.42
7.3.300.0050.00216.58
7.3.290.0110.00716.59
7.3.280.0030.01216.58
7.3.270.0100.01617.40
7.3.260.0110.00616.63
7.3.250.0100.00716.76
7.3.240.0060.01216.58
7.3.230.0090.00916.58
7.3.210.0100.00716.80
7.3.200.0030.01319.39
7.3.190.0070.01016.50
7.3.180.0080.01416.69
7.3.170.0040.01216.76
7.3.160.0170.00016.64
7.3.130.0100.01016.54
7.3.120.0080.00715.88
7.3.110.0070.01016.51
7.3.100.0000.00916.72
7.3.90.0030.00916.52
7.3.80.0090.00716.71
7.3.70.0030.01316.61
7.3.60.0120.00416.54
7.3.50.0030.00716.59
7.3.40.0060.01016.61
7.3.30.0090.00616.59
7.3.20.0070.01018.34
7.3.10.0080.00617.40
7.3.00.0050.01017.48
7.2.330.0090.00916.71
7.2.320.0100.01316.77
7.2.310.0040.01317.04
7.2.300.0100.00716.79
7.2.290.0060.00917.02
7.2.260.0040.01516.80
7.2.250.0060.00916.71
7.2.240.0060.00916.69
7.2.230.0000.01216.91
7.2.220.0030.01416.70
7.2.210.0060.01216.88
7.2.200.0060.00616.75
7.2.190.0080.00316.73
7.2.180.0070.00716.61
7.2.170.0080.00816.91
7.2.160.0110.00716.88
7.2.150.0030.01018.52
7.2.140.0030.01618.63
7.2.130.0060.01017.59
7.2.120.0080.00717.65
7.2.110.0060.00917.61
7.2.100.0080.00717.62
7.2.90.0020.01017.54
7.2.80.0090.00517.55
7.2.70.0030.01117.57
7.2.60.0060.00717.64
7.2.50.0070.00817.62
7.2.40.0070.00817.64
7.2.30.0050.00917.70
7.2.20.0040.00717.59
7.2.10.0080.00517.50
7.2.00.0080.00818.00
7.1.330.0060.00617.49
7.1.320.0030.01017.64
7.1.310.0060.00917.47
7.1.300.0110.00017.52
7.1.290.0080.00817.50
7.1.280.0080.00417.59
7.1.270.0120.00317.37
7.1.260.0070.00717.40
7.1.250.0050.00716.46
7.1.240.0040.01517.50
7.1.230.0080.00417.65
7.1.220.0030.01017.63
7.1.210.0000.01017.55
7.1.200.0040.00817.47
7.1.190.0000.00917.45
7.1.180.0070.01317.52
7.1.170.0030.01617.61
7.1.160.0000.01317.48
7.1.150.0030.01217.64
7.1.140.0060.00317.49
7.1.130.0040.01017.42
7.1.120.0070.01017.63
7.1.110.0140.00317.41
7.1.100.0030.01117.94
7.1.90.0090.00617.51
7.1.80.0030.01217.52
7.1.70.0050.00617.41
7.1.60.0070.00718.37
7.1.50.0130.00517.28
7.1.40.0040.01117.54
7.1.30.0040.00817.34
7.1.20.0070.00717.43
7.1.10.0060.00617.43
7.1.00.0050.04419.98
7.0.330.0060.00617.12
7.0.320.0070.01117.25
7.0.310.0030.00917.09
7.0.300.0160.00017.15
7.0.290.0040.00817.20
7.0.280.0070.01017.25
7.0.270.0030.00917.26
7.0.260.0030.00717.43
7.0.250.0120.00917.12
7.0.240.0100.00717.32
7.0.230.0040.01117.09
7.0.220.0110.00417.32
7.0.210.0040.01117.34
7.0.200.0440.00716.00
7.0.190.0090.00617.21
7.0.180.0030.01017.34
7.0.170.0030.00617.15
7.0.160.0000.00817.09
7.0.150.0030.00817.28
7.0.140.0050.04219.77
7.0.130.0110.00717.25
7.0.120.0070.00717.23
7.0.110.0040.00817.23
7.0.100.0030.00617.21
7.0.90.0030.00917.23
7.0.80.0100.00317.12
7.0.70.0060.00617.16
7.0.60.0050.03018.59
7.0.50.0050.02917.42
7.0.40.0070.02317.75
7.0.30.0150.04517.61
7.0.20.0170.02617.54
7.0.10.0100.04817.56
7.0.00.0070.04517.64
5.6.400.0090.00915.90
5.6.390.0060.00615.82
5.6.380.0110.00716.31
5.6.370.0060.00616.20
5.6.360.0000.01516.05
5.6.350.0080.00315.97
5.6.340.0070.00716.18
5.6.330.0030.01016.18
5.6.320.0070.01016.18
5.6.310.0040.01115.76
5.6.300.0030.01316.19
5.6.290.0120.00316.07
5.6.280.0030.04118.40
5.6.270.0060.00816.12
5.6.260.0070.00715.77
5.6.250.0040.00715.88
5.6.240.0090.00316.15
5.6.230.0060.00915.77
5.6.220.0030.01416.03
5.6.210.0030.02518.23
5.6.200.0050.02817.20
5.6.190.0080.04518.10
5.6.180.0150.02818.31
5.6.170.0220.04018.22
5.6.160.0000.02918.25
5.6.150.0050.04917.10
5.6.140.0120.04217.04
5.6.130.0080.03416.94
5.6.120.0080.02518.62
5.6.110.0130.04518.49
5.6.100.0030.05018.45
5.6.90.0120.04518.51
5.6.80.0080.03318.23
5.6.70.0130.02318.15
5.6.60.0030.00716.00
5.6.50.0060.00916.01
5.6.40.0030.01015.89
5.6.30.0050.00515.82
5.6.20.0040.01216.04
5.6.10.0060.00615.99
5.6.00.0040.01216.05
5.5.380.0090.00315.80
5.5.370.0120.00315.72
5.5.360.0060.00616.07
5.5.350.0050.03318.17
5.5.340.0070.04416.89
5.5.330.0070.04618.00
5.5.320.0140.04718.09
5.5.310.0240.03718.00
5.5.300.0100.02816.96
5.5.290.0050.04516.90
5.5.280.0070.02718.42
5.5.270.0030.05018.32
5.5.260.0030.03618.48
5.5.250.0070.03318.11
5.5.240.0020.02317.96
5.5.230.0080.00615.76
5.5.220.0060.00615.84
5.5.210.0030.00815.90
5.5.200.0120.00615.72
5.5.190.0000.01115.78
5.5.180.0060.00915.96
5.5.170.0120.00316.02
5.5.160.0040.00816.00
5.5.150.0040.00915.96
5.5.140.0040.01315.77
5.5.130.0070.01315.73
5.5.120.0000.01515.93
5.5.110.0150.00015.77
5.5.100.0080.00815.68
5.5.90.0140.00415.84
5.5.80.0030.01315.85
5.5.70.0090.00615.86
5.5.60.0040.01215.89
5.5.50.0100.00715.61
5.5.40.0070.01015.63
5.5.30.0070.00715.91
5.5.20.0030.00915.75
5.5.10.0110.00415.70
5.5.00.0070.00716.04
5.4.450.0120.03516.09
5.4.440.0220.03816.01
5.4.430.0170.02815.88
5.4.420.0240.03516.08
5.4.410.0200.02815.88
5.4.400.0150.01915.99
5.4.390.0130.02515.81
5.4.380.0160.02215.93
5.4.370.0140.01815.79
5.4.360.0110.02515.91
5.4.350.0160.01715.64
5.4.340.0120.02416.00
5.4.330.0120.00012.64
5.4.320.0130.02315.89
5.4.310.0170.01815.65
5.4.300.0110.02415.65
5.4.290.0120.03415.76
5.4.280.0150.02415.79
5.4.270.0130.02215.84
5.4.260.0150.02515.88
5.4.250.0120.02015.76
5.4.240.0100.02415.83
5.4.230.0080.02215.93
5.4.220.0110.02815.89
5.4.210.0150.01815.91
5.4.200.0130.03415.91
5.4.190.0150.03215.67
5.4.180.0190.03815.69
5.4.170.0170.03015.75
5.4.160.0200.03515.84
5.4.150.0200.02715.88
5.4.140.0170.03014.62
5.4.130.0120.02414.46
5.4.120.0150.04214.54
5.4.110.0180.03814.51
5.4.100.0200.03614.44
5.4.90.0200.03514.48
5.4.80.0180.02914.42
5.4.70.0190.03014.52
5.4.60.0170.02714.33
5.4.50.0170.03514.55
5.4.40.0220.03414.46
5.4.30.0150.02514.51
5.4.20.0180.03314.55
5.4.10.0180.03314.52
5.4.00.0230.02114.19
5.3.290.0120.02413.84
5.3.280.0150.02013.73
5.3.270.0180.03813.86
5.3.260.0150.04513.76
5.3.250.0180.03613.77
5.3.240.0130.02613.86
5.3.230.0150.04413.82
5.3.220.0250.03313.72
5.3.210.0150.02813.76
5.3.200.0130.02913.67
5.3.190.0130.03513.71
5.3.180.0170.04113.79
5.3.170.0210.02013.87
5.3.160.0150.02813.71
5.3.150.0170.03913.65
5.3.140.0150.03413.77
5.3.130.0200.03813.68
5.3.120.0230.03513.62
5.3.110.0150.02913.73
5.3.100.0140.03613.56
5.3.90.0150.02613.51
5.3.80.0190.03913.38
5.3.70.0200.02513.35
5.3.60.0210.03813.46
5.3.50.0170.02813.28
5.3.40.0180.04013.40
5.3.30.0250.03213.34
5.3.20.0250.03013.27
5.3.10.0170.03713.22
5.3.00.0170.03413.13
5.2.170.0230.06012.22
5.2.160.0230.04312.22
5.2.150.0270.04712.22
5.2.140.0270.05012.22
5.2.130.0270.03712.22
5.2.120.0230.04712.22
5.2.110.0270.05712.22
5.2.100.0270.04712.22
5.2.90.0370.04712.22
5.2.80.0330.05312.22
5.2.70.0270.05312.22
5.2.60.0270.03312.22
5.2.50.0200.06012.22
5.2.40.0230.06012.22
5.2.30.0200.05312.22
5.2.20.0170.05012.22
5.2.10.0170.03012.22
5.2.00.0230.06012.22
5.1.60.0200.04712.22
5.1.50.0200.04012.22
5.1.40.0200.05012.22
5.1.30.0200.04312.22
5.1.20.0200.05312.22
5.1.10.0200.05012.22
5.1.00.0170.05312.22
5.0.50.0200.02012.22
5.0.40.0200.01312.22
5.0.30.0070.06312.22
5.0.20.0170.03312.22
5.0.10.0100.03712.22
5.0.00.0100.04712.22
4.4.90.0130.03012.22
4.4.80.0100.02712.22
4.4.70.0100.01712.22
4.4.60.0130.02712.22
4.4.50.0130.03312.22
4.4.40.0100.05712.22
4.4.30.0170.03012.22
4.4.20.0100.03312.22
4.4.10.0100.03312.22
4.4.00.0100.05312.22
4.3.110.0170.02312.22
4.3.100.0130.03012.22
4.3.90.0170.02012.22
4.3.80.0030.04712.22
4.3.70.0070.02012.22
4.3.60.0070.02012.22
4.3.50.0070.02012.22
4.3.40.0130.02312.22
4.3.30.0030.02312.22
4.3.20.0030.03312.22
4.3.10.0030.03712.22
4.3.00.0030.03312.22

preferences:
43.47 ms | 401 KiB | 5 Q