3v4l.org

run code in 500+ PHP versions simultaneously
<?php $regex = '#[\-\d]$#'; $regex2 = '#[\\-\d]$#'; $regex3 = '#[\\\-\d]$#'; $value = '12-4'; preg_match($regex, $value, $matches); var_dump($matches); preg_match($regex2, $value, $matches); var_dump($matches); preg_match($regex3, $value, $matches); var_dump($matches);

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.5.70.0050.00416.92
8.5.60.0140.00217.08
8.5.50.0090.00816.83
8.5.30.0120.00617.36
8.5.20.0110.00719.36
8.5.10.0130.00617.00
8.5.00.0130.01020.02
8.4.220.0060.00819.52
8.4.210.0110.00819.67
8.4.180.0130.01019.80
8.4.170.0110.01221.80
8.4.160.0080.01222.04
8.4.150.0070.00516.91
8.4.140.0120.01017.76
8.4.130.0140.00618.68
8.4.120.0050.00520.94
8.4.110.0050.00418.94
8.4.100.0100.01018.06
8.4.90.0140.00620.45
8.4.80.0100.00720.54
8.4.70.0020.00720.41
8.4.60.0110.00920.75
8.4.50.0130.00720.37
8.4.40.0130.00919.86
8.4.30.0070.01318.57
8.4.20.0030.00618.16
8.4.10.0030.00619.65
8.3.310.0040.00418.57
8.3.300.0130.00818.48
8.3.290.0060.01420.67
8.3.280.0110.00918.51
8.3.270.0110.01016.45
8.3.260.0110.00616.83
8.3.250.0120.00616.55
8.3.240.0050.00516.73
8.3.230.0090.01016.59
8.3.220.0130.00518.83
8.3.210.0110.00816.91
8.3.200.0130.00716.78
8.3.190.0090.00719.09
8.3.180.0110.00818.75
8.3.170.0120.00617.00
8.3.160.0110.00716.82
8.3.150.0060.01216.76
8.3.140.0040.01216.87
8.3.130.0110.00016.75
8.3.120.0200.00318.84
8.3.110.0080.00020.94
8.3.100.0120.00318.65
8.3.90.0050.00318.37
8.3.80.0060.00318.56
8.3.70.0250.00018.68
8.3.60.0080.00818.56
8.3.50.0080.01024.52
8.3.40.0090.01218.75
8.3.30.0120.00918.84
8.3.20.0020.00521.74
8.3.10.0040.00420.39
8.3.00.0040.00423.54
8.2.310.0090.01018.22
8.2.300.0140.00622.29
8.2.290.0080.00316.98
8.2.280.0110.00920.47
8.2.270.0100.01016.69
8.2.260.0090.00617.05
8.2.250.0040.00417.04
8.2.240.0040.00417.37
8.2.230.0060.00322.58
8.2.220.0070.00424.06
8.2.210.0040.00726.77
8.2.200.0060.00318.54
8.2.190.0120.00616.88
8.2.180.0130.00318.51
8.2.170.0070.01122.96
8.2.160.0030.01022.44
8.2.150.0070.00024.18
8.2.140.0040.00424.66
8.2.130.0050.00326.16
8.2.120.0070.00026.16
8.2.110.0040.00422.29
8.2.100.0080.00417.97
8.2.90.0040.00417.88
8.2.80.0060.00318.91
8.2.70.0040.00417.80
8.2.60.0080.00018.09
8.2.50.0040.00419.45
8.2.40.0000.00719.39
8.2.30.0050.00319.07
8.2.20.0050.00218.00
8.2.10.0040.00419.25
8.2.00.0040.00419.06
8.1.340.0100.00925.26
8.1.330.0100.00916.23
8.1.320.0090.00818.36
8.1.310.0070.01116.62
8.1.300.0000.00816.20
8.1.290.0030.00618.88
8.1.280.0040.01425.92
8.1.270.0040.00420.21
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0090.00023.67
8.1.230.0080.00417.76
8.1.220.0040.00417.74
8.1.210.0040.00418.77
8.1.200.0040.00417.25
8.1.190.0030.00617.25
8.1.180.0060.00318.84
8.1.170.0030.00518.59
8.1.160.0040.00419.07
8.1.150.0030.00518.74
8.1.140.0040.00418.69
8.1.130.0050.00320.08
8.1.120.0040.00417.49
8.1.110.0030.00417.50
8.1.100.0030.00317.39
8.1.90.0040.00417.56
8.1.80.0050.00317.54
8.1.70.0000.00817.41
8.1.60.0040.00417.54
8.1.50.0000.00817.50
8.1.40.0080.00017.60
8.1.30.0000.00817.77
8.1.20.0030.00517.61
8.1.10.0050.00317.63
8.1.00.0050.00217.54
8.0.300.0040.00418.79
8.0.290.0040.00416.75
8.0.280.0030.00318.38
8.0.270.0030.00317.00
8.0.260.0000.00618.39
8.0.250.0030.00316.98
8.0.240.0040.00416.99
8.0.230.0040.00416.99
8.0.220.0070.00016.99
8.0.210.0030.00317.08
8.0.200.0000.00816.97
8.0.190.0040.00417.09
8.0.180.0000.00816.95
8.0.170.0030.00617.04
8.0.160.0000.00717.04
8.0.150.0040.00316.86
8.0.140.0030.00816.86
8.0.130.0000.00613.49
8.0.120.0050.00317.00
8.0.110.0040.00417.05
8.0.100.0050.00217.08
8.0.90.0030.00617.03
8.0.80.0080.01417.03
8.0.70.0000.00816.86
8.0.60.0040.00417.05
8.0.50.0080.00016.91
8.0.30.0070.01017.26
8.0.20.0200.00317.09
8.0.10.0000.00716.97
8.0.00.0140.00817.08
7.4.330.0000.00415.55
7.4.320.0030.00316.55
7.4.300.0000.00616.61
7.4.290.0030.00316.66
7.4.280.0060.00316.58
7.4.270.0000.00716.78
7.4.260.0000.00513.39
7.4.250.0070.00016.68
7.4.240.0020.00516.63
7.4.230.0030.00516.49
7.4.220.0000.00716.47
7.4.210.0070.00816.72
7.4.200.0000.00716.61
7.4.130.0170.00516.56
7.4.120.0100.00716.44
7.4.110.0120.00916.72
7.4.100.0030.01516.64
7.4.90.0170.00016.68
7.4.80.0060.01719.39
7.4.70.0080.00816.59
7.4.60.0090.00616.57
7.4.50.0080.00816.43
7.4.40.0070.01116.56
7.4.30.0080.00816.65
7.4.20.0060.01116.61
7.4.10.0080.00916.71
7.4.00.0080.00916.66
7.3.330.0030.00316.25
7.3.320.0000.00713.05
7.3.310.0000.00816.23
7.3.300.0040.00216.32
7.3.290.0100.00516.28
7.3.260.0130.00316.80
7.3.240.0050.01216.42
7.3.230.0080.00816.52
7.3.210.0030.01316.52
7.3.200.0120.00616.49
7.3.190.0060.00916.18
7.3.180.0090.00616.30
7.3.170.0070.01116.43
7.3.160.0060.01116.40
7.3.150.0080.00816.23
7.3.140.0100.00616.50
7.3.130.0090.00616.46
7.3.120.0110.00716.29
7.3.110.0060.01016.36
7.3.100.0090.00716.38
7.3.90.0050.01216.33
7.3.80.0080.00816.22
7.3.70.0070.01016.35
7.3.60.0100.00816.36
7.3.50.0100.00616.45
7.3.40.0060.00916.35
7.3.30.0090.00716.36
7.3.20.0140.00816.43
7.3.10.0110.00616.26
7.3.00.0080.00816.39
7.2.330.0180.00716.54
7.2.320.0070.01416.59
7.2.310.0060.01116.50
7.2.300.0060.01116.65
7.2.290.0090.00816.53
7.2.280.0080.00916.47
7.2.270.0010.01516.56
7.2.260.0080.01016.63
7.2.250.0080.00916.63
7.2.240.0050.01116.54
7.2.230.0090.00716.49
7.2.220.0080.00916.45
7.2.210.0100.00816.64
7.2.200.0060.01116.46
7.2.190.0080.01116.52
7.2.180.0040.01416.61
7.2.170.0070.01016.46
7.2.160.0040.01216.44
7.2.150.0110.00816.58
7.2.140.0120.00916.54
7.2.130.0090.01016.56
7.2.120.0080.00916.66
7.2.110.0110.01016.60
7.2.100.0100.00816.59
7.2.90.0130.00516.66
7.2.80.0180.00616.61
7.2.70.0100.00916.63
7.2.60.0100.00816.51
7.2.50.0110.00716.57
7.2.40.0080.00916.54
7.2.30.0090.00916.59
7.2.20.0100.01116.55
7.2.10.0090.00816.59
7.2.00.0110.00616.61

preferences:
87.13 ms | 1548 KiB | 5 Q