3v4l.org

run code in 300+ PHP versions simultaneously
<?php $regex = '(^([a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*|\0\\\\\0)$)'; $classes = [ 'foo', 'foo\\bar', 'foo\\bar\\baz', ]; foreach ($classes as $class) { var_dump(preg_match($regex, $class)); }

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.0090.00616.50
8.3.50.0070.01022.91
8.3.40.0110.00418.77
8.3.30.0000.01419.03
8.3.20.0050.00320.19
8.3.10.0000.00723.64
8.3.00.0060.00319.25
8.2.180.0100.00725.92
8.2.170.0060.00919.26
8.2.160.0000.01622.96
8.2.150.0080.00024.18
8.2.140.0000.00724.66
8.2.130.0030.01026.16
8.2.120.0070.00021.14
8.2.110.0000.02020.47
8.2.100.0030.00818.03
8.2.90.0050.00219.23
8.2.80.0000.00817.97
8.2.70.0060.00317.75
8.2.60.0040.00417.93
8.2.50.0000.00818.07
8.2.40.0040.00418.22
8.2.30.0040.00418.13
8.2.20.0040.00417.91
8.2.10.0000.00718.16
8.2.00.0070.00017.70
8.1.280.0120.00625.92
8.1.270.0110.00423.71
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0090.00022.14
8.1.230.0030.00922.08
8.1.220.0000.00817.74
8.1.210.0030.00518.77
8.1.200.0130.00917.13
8.1.190.0000.00817.35
8.1.180.0040.00418.10
8.1.170.0080.00418.59
8.1.160.0000.00722.04
8.1.150.0030.00518.82
8.1.140.0100.00017.63
8.1.130.0040.00417.84
8.1.120.0070.00017.62
8.1.110.0080.00017.60
8.1.100.0050.00217.50
8.1.90.0070.00317.48
8.1.80.0050.00217.51
8.1.70.0030.00517.61
8.1.60.0030.00617.73
8.1.50.0000.00817.70
8.1.40.0000.00817.71
8.1.30.0030.00517.67
8.1.20.0040.00417.78
8.1.10.0040.00417.58
8.1.00.0080.00017.47
8.0.300.0000.00718.77
8.0.290.0040.00416.88
8.0.280.0030.00518.46
8.0.270.0000.00717.31
8.0.260.0030.00317.27
8.0.250.0030.00317.03
8.0.240.0040.00417.10
8.0.230.0040.00317.07
8.0.220.0070.00017.00
8.0.210.0030.00316.94
8.0.200.0030.00317.05
8.0.190.0000.00717.09
8.0.180.0080.00017.05
8.0.170.0080.00017.06
8.0.160.0000.00817.01
8.0.150.0000.00716.96
8.0.140.0030.00616.88
8.0.130.0050.00313.50
8.0.120.0050.00316.90
8.0.110.0000.00716.95
8.0.100.0040.00416.86
8.0.90.0040.00416.86
8.0.80.0110.00716.95
8.0.70.0030.00517.05
8.0.60.0030.00616.83
8.0.50.0000.00817.06
8.0.30.0140.00317.21
8.0.20.0140.00517.40
8.0.10.0040.00417.04
8.0.00.0150.00516.79
7.4.330.0050.00015.11
7.4.320.0000.00716.84
7.4.300.0050.00316.84
7.4.290.0030.00316.81
7.4.280.0040.00416.66
7.4.270.0000.00716.79
7.4.260.0030.00616.58
7.4.250.0040.00416.78
7.4.240.0020.00516.76
7.4.230.0030.00316.55
7.4.220.0070.01116.76
7.4.210.0140.00016.84
7.4.200.0040.00416.60
7.4.160.0100.00616.78
7.4.150.0130.00617.40
7.4.140.0100.01917.86
7.4.130.0130.01016.75
7.4.120.0060.01116.79
7.4.110.0040.01216.78
7.4.100.0100.00716.64
7.4.90.0070.01016.67
7.4.80.0070.01019.39
7.4.70.0140.00716.68
7.4.60.0120.00616.65
7.4.50.0080.00016.80
7.4.40.0030.01216.62
7.4.30.0070.01016.68
7.4.00.0070.01115.27
7.3.330.0070.00013.30
7.3.320.0000.00613.09
7.3.310.0030.00316.29
7.3.300.0000.00716.21
7.3.290.0040.01116.37
7.3.280.0110.00616.45
7.3.270.0130.00717.40
7.3.260.0130.01016.63
7.3.250.0060.01116.57
7.3.240.0130.00516.42
7.3.230.0100.01016.71
7.3.210.0110.00716.67
7.3.200.0090.01319.39
7.3.190.0060.01116.40
7.3.180.0060.01016.84
7.3.170.0080.00916.38
7.3.160.0060.00916.41
7.2.330.0110.01116.73
7.2.320.0150.00916.80
7.2.310.0120.00416.77
7.2.300.0060.01016.76
7.2.290.0060.01016.82
7.2.60.0130.00317.07
7.2.00.0070.01019.59
7.1.200.0100.00316.09
7.1.100.0030.01318.34
7.1.70.0030.00617.33
7.1.60.0090.01619.40
7.1.50.0040.01817.29
7.1.00.0070.07322.33
7.0.200.0080.00517.06
7.0.140.0000.07022.21
7.0.60.0030.08719.98
7.0.50.0030.08317.91
7.0.40.0100.08720.32
7.0.30.0330.07720.11
7.0.20.0300.07720.46
7.0.10.0130.05020.11
7.0.00.0000.04320.03
5.6.280.0100.06721.03
5.6.210.0100.08020.47
5.6.200.0030.05718.20
5.6.190.0130.07320.46
5.6.180.4030.04020.41
5.6.170.0200.05320.39
5.6.160.0070.08020.38
5.6.150.0170.06018.09
5.6.140.0070.08018.07
5.6.130.0070.03718.12
5.6.120.0030.04320.92
5.6.110.0070.08020.98
5.6.100.0170.06721.13
5.6.90.0030.04020.88
5.6.80.0170.07020.38
5.5.350.0100.07320.32
5.5.340.0170.07017.88
5.5.330.0030.08720.43
5.5.320.0330.07320.21
5.5.310.0300.06320.29
5.5.300.0000.08717.88
5.5.290.0070.07317.98
5.5.280.0030.05020.65
5.5.270.0100.07720.95
5.5.260.0070.03720.76
5.5.250.0000.04320.77
5.5.240.0230.07020.35
5.4.450.0300.07019.39
5.4.440.0430.05719.41
5.4.430.0300.07019.13
5.4.420.0230.04019.51
5.4.410.0170.04319.43
5.4.400.0230.07019.25
5.4.390.0170.08019.24
5.4.380.0230.03718.88
5.4.370.0170.05718.88
5.4.360.0270.06019.16
5.4.350.0330.05718.93
5.4.340.0300.06319.09
5.4.320.0230.07018.93
5.4.310.0230.06019.25
5.4.300.0300.07019.13
5.4.290.0270.06718.88
5.4.280.0300.06019.24
5.4.270.0270.07319.21
5.4.260.0370.06018.81
5.4.250.0200.07318.80
5.4.240.0270.05319.21
5.4.230.0330.04019.13
5.4.220.0370.05718.80
5.4.210.0200.06019.12
5.4.200.0200.05019.25
5.4.190.0330.06719.20
5.4.180.0170.08018.87
5.4.170.0230.04719.23
5.4.160.0300.05719.04
5.4.150.0270.07019.07
5.4.140.0230.07316.27
5.4.130.0230.04316.27
5.4.120.0230.05716.26
5.4.110.0270.07016.34
5.4.100.0170.04316.48
5.4.90.0430.05316.32
5.4.80.0270.06016.48
5.4.70.0300.05316.41
5.4.60.0230.06716.18
5.4.50.0300.05316.41
5.4.40.0330.03716.05
5.4.30.0170.04716.36
5.4.20.0300.05316.21
5.4.10.0170.05316.38
5.4.00.0270.05015.76
5.3.290.0270.07014.70
5.3.280.0300.07014.55
5.3.270.0170.08014.45
5.3.260.0200.04014.45
5.3.250.0300.06014.46
5.3.240.0200.04314.55
5.3.230.0270.07314.45
5.3.220.0270.04314.61
5.3.210.0230.05014.61
5.3.200.0270.06314.47
5.3.190.0230.07314.50
5.3.180.0300.06714.61
5.3.170.0270.06014.51
5.3.160.0230.04314.51
5.3.150.0200.06014.40
5.3.140.0230.04014.61
5.3.130.0270.07314.39
5.3.120.0270.04314.64
5.3.110.0230.08714.63
5.3.100.0200.07313.98
5.3.90.0130.05714.11
5.3.80.0270.03313.79
5.3.70.0200.06314.04
5.3.60.0230.04313.83
5.3.50.0270.06013.97
5.3.40.0270.06013.99
5.3.30.0330.04013.80
5.3.20.0230.05313.64
5.3.10.0300.06313.61
5.3.00.0270.05013.48
5.2.170.0170.06312.03
5.2.160.0230.05312.03
5.2.150.0230.04012.03
5.2.140.0200.06312.03
5.2.130.0200.04312.03
5.2.120.0230.06012.03
5.2.110.0130.04312.03
5.2.100.0300.04012.03
5.2.90.0200.04312.03
5.2.80.0200.04312.03
5.2.70.0200.04012.03
5.2.60.0330.04712.03
5.2.50.0270.05012.03
5.2.40.0200.05712.03
5.2.30.0200.04712.03
5.2.20.0170.06012.03
5.2.10.0100.04712.03
5.2.00.0170.04312.03
5.1.60.0130.02312.03
5.1.50.0230.05012.03
5.1.40.0330.03712.03
5.1.30.0200.05012.03
5.1.20.0170.05012.03
5.1.10.0170.04712.03
5.1.00.0170.04312.03
5.0.50.0100.04712.03
5.0.40.0130.04012.03
5.0.30.0070.03712.03
5.0.20.0200.02312.03
5.0.10.0070.04312.03
5.0.00.0100.05312.03
4.4.90.0030.02012.03
4.4.80.0070.02712.03
4.4.70.0130.03712.03
4.4.60.0070.02312.03
4.4.50.0100.03312.03
4.4.40.0030.03312.03
4.4.30.0130.03012.03
4.4.20.0170.02712.03
4.4.10.0100.03012.03
4.4.00.0200.03012.03
4.3.110.0030.03712.03
4.3.100.0100.03312.03
4.3.90.0170.02312.03
4.3.80.0030.04312.03
4.3.70.0100.02312.03
4.3.60.0100.02312.03
4.3.50.0030.02712.03
4.3.40.0070.05312.03
4.3.30.0030.02712.03
4.3.20.0030.03712.03
4.3.10.0030.03712.03
4.3.00.0100.03012.03

preferences:
40.58 ms | 400 KiB | 5 Q