3v4l.org

run code in 300+ PHP versions simultaneously
<?php # The problem, hyphen use within class in incorrect position. var_dump(preg_match('~[0-9\w-.]*~', '')); # The fix, or we escape the hyphen or we put it last var_dump(preg_match('~[0-9\w\-.]*~', '')); var_dump(preg_match('~[0-9\w.-]*~', ''));

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.0110.00718.80
8.3.50.0170.00517.49
8.3.40.0070.01018.83
8.3.30.0120.00318.84
8.3.20.0000.00821.94
8.3.10.0080.00021.91
8.3.00.0040.00421.77
8.2.180.0040.01116.63
8.2.170.0110.00422.96
8.2.160.0090.00620.43
8.2.150.0080.00024.18
8.2.140.0030.00624.66
8.2.130.0040.00426.16
8.2.120.0050.00221.13
8.2.110.0090.00019.31
8.2.100.0060.00618.03
8.2.90.0060.00619.81
8.2.80.0000.00817.97
8.2.70.0030.00617.75
8.2.60.0000.00718.09
8.2.50.0060.00318.10
8.2.40.0030.00619.39
8.2.30.0000.00720.50
8.2.20.0000.00717.76
8.2.10.0040.00419.02
8.2.00.0040.00417.96
8.1.280.0110.00725.92
8.1.270.0080.00021.98
8.1.260.0050.00326.35
8.1.250.0030.00628.09
8.1.240.0040.00419.12
8.1.230.0000.01220.88
8.1.220.0060.00317.74
8.1.210.0000.00818.79
8.1.200.0040.00817.35
8.1.190.0030.00617.25
8.1.180.0090.00018.10
8.1.170.0040.00418.71
8.1.160.0040.00418.82
8.1.150.0070.00018.83
8.1.140.0080.00018.69
8.1.130.0070.00020.37
8.1.120.0000.00717.43
8.1.110.0030.00617.47
8.1.100.0060.00317.43
8.1.90.0030.00617.52
8.1.80.0000.00917.51
8.1.70.0080.00017.35
8.1.60.0050.00317.60
8.1.50.0050.00317.43
8.1.40.0030.00617.45
8.1.30.0050.00317.56
8.1.20.0030.00617.52
8.1.10.0000.00817.51
8.1.00.0040.00417.39
8.0.300.0040.00421.89
8.0.290.0080.00016.75
8.0.280.0000.00718.25
8.0.270.0030.00317.00
8.0.260.0030.00318.34
8.0.250.0080.00017.13
8.0.240.0050.00316.96
8.0.230.0070.00316.92
8.0.220.0030.00616.90
8.0.210.0030.00317.04
8.0.200.0030.00617.08
8.0.190.0060.00316.98
8.0.180.0060.00317.11
8.0.170.0080.00017.07
8.0.160.0000.00816.96
8.0.150.0070.00016.86
8.0.140.0040.00417.01
8.0.130.0030.00313.46
8.0.120.0050.00316.95
8.0.110.0040.00416.99
8.0.100.0000.00716.96
8.0.90.0040.00416.97
8.0.80.0060.00917.05
8.0.70.0030.00517.05
8.0.60.0060.00316.91
8.0.50.0070.00016.92
8.0.30.0160.00317.10
8.0.20.0080.01717.11
8.0.10.0030.00517.07
8.0.00.0090.01016.83
7.4.330.0050.00015.55
7.4.320.0000.00616.55
7.4.300.0000.00616.68
7.4.290.0070.00016.58
7.4.280.0040.00416.67
7.4.270.0030.00316.50
7.4.260.0070.00016.70
7.4.250.0030.00316.53
7.4.240.0050.00216.72
7.4.230.0000.00716.67
7.4.220.0000.00816.67
7.4.210.0090.01016.65
7.4.200.0030.00316.74
7.4.140.0060.01217.86
7.4.130.0130.00416.79
7.4.120.0060.01216.66
7.4.110.0030.01316.48
7.4.100.0110.00716.70
7.4.90.0100.01016.46
7.4.80.0100.01319.39
7.4.70.0060.01116.64
7.4.60.0030.01516.64
7.4.50.0050.00516.32
7.4.40.0080.00816.69
7.4.00.0070.01015.06
7.3.330.0030.00313.16
7.3.320.0000.00513.27
7.3.310.0040.00416.40
7.3.300.0000.00716.41
7.3.290.0030.00316.39
7.3.280.0070.01016.42
7.3.260.0110.00916.50
7.3.240.0090.00816.48
7.3.230.0100.01416.43
7.3.210.0100.00716.48
7.3.200.0030.01416.34
7.3.190.0180.00416.29
7.3.180.0160.00016.19
7.3.170.0030.01916.44
7.3.160.0090.00616.73
7.3.40.0030.00914.87
7.3.30.0120.00914.88
7.3.20.0070.00716.48
7.3.10.0000.01316.75
7.3.00.0120.00816.56
7.2.330.0140.00316.71
7.2.320.0100.00716.59
7.2.310.0190.00616.56
7.2.300.0060.01516.47
7.2.290.0100.01316.49
7.2.170.0040.00814.91
7.2.160.0140.00314.73
7.2.150.0030.01017.02
7.2.140.0100.00316.92
7.2.130.0090.00316.92
7.2.120.0200.00016.82
7.2.110.0070.00716.97
7.2.100.0000.01116.84
7.2.90.0070.00317.02
7.2.80.0040.00816.75
7.2.70.0040.00716.79
7.2.60.0070.01116.88
7.2.50.0040.00816.83
7.2.40.0070.00416.73
7.2.30.0100.00016.86
7.2.20.0000.01016.96
7.2.10.0000.01316.82
7.2.00.0120.00616.73
7.1.280.0090.01215.76
7.1.270.0060.00615.88
7.1.260.0070.01215.85
7.1.250.0060.00315.60

preferences:
67.48 ms | 401 KiB | 5 Q