3v4l.org

run code in 300+ PHP versions simultaneously
<?php $re = '~[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?|\d+|(?>\p{L}\p{M}*+)+~u'; $text = "The example number 2 is a bad example it will not \ncount numbers and punctuations !! X is 2.5674."; if (preg_match_all($re, $text, $matches)) { echo count($matches[0]) . PHP_EOL; print_r($matches[0]); }

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.4.140.0130.00918.12
8.4.130.0130.00918.09
8.4.120.0060.00320.43
8.4.110.0110.00922.11
8.4.100.0120.00917.95
8.4.90.0100.00318.66
8.4.80.0110.00919.89
8.4.70.0100.00718.30
8.4.60.0080.01318.79
8.4.50.0040.00420.59
8.4.40.0070.00317.77
8.4.30.0120.00622.25
8.4.20.0080.00020.95
8.4.10.0110.00417.75
8.3.270.0130.00616.75
8.3.260.0090.01116.76
8.3.250.0050.00418.95
8.3.240.0060.01216.70
8.3.230.0120.00716.92
8.3.220.0080.00817.31
8.3.210.0110.00916.91
8.3.200.0080.00116.84
8.3.190.0060.00817.05
8.3.180.0110.00816.77
8.3.170.0150.00316.97
8.3.160.0100.01018.70
8.3.150.0130.00718.46
8.3.140.0150.00418.99
8.3.130.0080.00016.94
8.3.120.0090.00918.80
8.3.110.0040.01117.00
8.3.100.0030.00524.06
8.3.90.0070.00426.77
8.3.80.0030.00616.88
8.3.70.0110.00416.88
8.3.60.0000.01518.33
8.3.50.0110.00618.50
8.3.40.0090.00618.95
8.3.30.0110.00419.09
8.3.20.0000.00820.86
8.3.10.0050.00321.73
8.3.00.0050.00322.52
8.2.290.0120.00820.51
8.2.280.0090.00918.48
8.2.270.0060.01317.23
8.2.260.0150.00318.80
8.2.250.0090.00017.06
8.2.240.0060.00319.05
8.2.230.0080.00020.94
8.2.220.0120.00337.54
8.2.210.0090.00026.77
8.2.200.0060.00317.13
8.2.190.0040.01817.13
8.2.180.0070.01418.54
8.2.170.0060.00922.96
8.2.160.0070.00720.52
8.2.150.0050.00324.18
8.2.140.0080.00024.66
8.2.130.0040.00426.16
8.2.120.0040.00421.00
8.2.110.0000.01122.38
8.2.100.0060.00618.03
8.2.90.0080.00022.46
8.2.80.0080.00019.33
8.2.70.0000.00818.05
8.2.60.0040.00418.34
8.2.50.0030.00618.10
8.2.40.0040.00419.55
8.2.30.0040.00419.43
8.2.20.0070.00018.47
8.2.10.0070.00019.43
8.2.00.0070.00019.35
8.1.330.0120.00723.75
8.1.320.0080.01116.62
8.1.310.0080.00018.41
8.1.300.0030.00616.62
8.1.290.0060.00318.88
8.1.280.0000.01525.92
8.1.270.0060.00322.42
8.1.260.0060.01226.35
8.1.250.0040.00428.09
8.1.240.0030.00622.46
8.1.230.0040.00720.88
8.1.220.0060.00317.74
8.1.210.0030.00618.96
8.1.200.0040.00417.60
8.1.190.0000.00817.29
8.1.180.0050.00318.10
8.1.170.0030.00520.80
8.1.160.0070.00419.12
8.1.150.0000.00718.96
8.1.140.0000.00720.82
8.1.130.0000.00721.87
8.1.120.0030.00517.71
8.1.110.0080.00017.67
8.1.100.0040.00417.66
8.1.90.0030.00517.58
8.1.80.0060.00317.62
8.1.70.0030.00317.61
8.1.60.0000.00717.79
8.1.50.0050.00317.71
8.1.40.0000.00817.74
8.1.30.0040.00417.84
8.1.20.0000.00817.83
8.1.10.0040.00417.77
8.1.00.0040.00417.58
8.0.300.0070.00020.11
8.0.290.0000.00817.00
8.0.280.0070.00018.46
8.0.270.0070.00017.10
8.0.260.0030.00320.11
8.0.250.0000.00717.20
8.0.240.0000.00717.15
8.0.230.0000.00717.06
8.0.220.0000.00717.06
8.0.210.0060.00317.08
8.0.200.0000.00717.25
8.0.190.0040.00417.12
8.0.180.0030.00517.05
8.0.170.0000.00917.15
8.0.160.0040.00417.14
8.0.150.0040.00417.04
8.0.140.0050.00316.98
8.0.130.0050.00013.52
8.0.120.0040.00417.18
8.0.110.0040.00417.21
8.0.100.0040.00417.14
8.0.90.0060.00317.20
8.0.80.0060.01117.18
8.0.70.0000.00717.13
8.0.60.0000.00717.01
8.0.50.0040.00417.22
8.0.30.0120.00617.43
8.0.20.0120.00817.56
8.0.10.0000.00717.24
8.0.00.0120.00617.00
7.4.330.0060.00015.55
7.4.320.0030.00316.72
7.4.300.0000.00616.81
7.4.290.0040.00416.72
7.4.280.0040.00416.87
7.4.270.0060.00316.89
7.4.260.0000.00713.59
7.4.250.0040.00416.83
7.4.240.0060.00216.84
7.4.230.0030.00316.81
7.4.220.0020.00516.79
7.4.210.0090.01016.87
7.4.200.0000.00816.80
7.4.130.0060.01216.80
7.4.120.0110.01116.73
7.4.110.0070.01116.68
7.4.100.0140.00616.74
7.4.90.0090.01016.70
7.4.80.0080.01318.01
7.4.70.0070.01116.73
7.4.60.0080.01416.75
7.4.50.0080.01116.80
7.4.40.0110.00616.60
7.4.30.0120.01216.53
7.4.20.0070.01016.61
7.4.10.0100.01016.52
7.4.00.0110.00715.83
7.3.330.0040.00416.47
7.3.320.0060.00013.21
7.3.310.0000.00716.43
7.3.300.0050.00216.45
7.3.290.0080.00916.50
7.3.280.0060.00916.34
7.3.260.0090.00916.57
7.3.230.0070.01116.60
7.3.220.0000.02216.57
7.3.210.0090.01116.49
7.3.200.0170.00316.50
7.3.190.0100.00616.63
7.3.180.0080.01116.62
7.3.170.0120.00616.67
7.3.160.0150.00516.52
7.3.150.0110.00716.67
7.3.140.0090.00916.50
7.3.130.0030.01616.60
7.3.120.0100.00716.66
7.3.110.0060.01216.32
7.3.100.0130.00515.61
7.3.90.0150.00315.83
7.3.80.0080.00815.73
7.3.70.0050.01115.73
7.3.60.0110.00515.77
7.3.50.0140.00615.64
7.3.40.0060.01115.54
7.3.30.0080.00815.65
7.3.20.0110.00415.77
7.3.10.0090.00615.80
7.3.00.0070.00915.75
7.2.340.0110.00916.84
7.2.330.0100.00716.77
7.2.320.0070.01016.81
7.2.310.0110.00916.68
7.2.300.0060.01316.79
7.2.290.0150.00516.72
7.2.280.0120.00616.81
7.2.270.0130.00616.69
7.2.260.0150.00916.95
7.2.250.0110.00816.75
7.2.240.0170.00416.73
7.2.230.0120.00615.79
7.2.220.0100.01015.86
7.2.210.0120.00516.05
7.2.200.0110.00915.94
7.2.190.0090.01115.95
7.2.180.0060.01316.06
7.2.170.0070.00915.97
7.2.160.0100.00715.80
7.2.150.0080.00816.07
7.2.140.0080.00716.09
7.2.130.0130.00516.00
7.2.120.0070.01215.93
7.2.110.0150.00316.03
7.2.100.0060.01116.07
7.2.90.0090.01216.18
7.2.80.0140.00816.18
7.2.70.0110.00916.11
7.2.60.0100.01015.97
7.2.50.0070.01016.01
7.2.40.0130.00316.07
7.2.30.0130.00715.92
7.2.20.0120.00615.92
7.2.10.0110.00916.02
7.2.00.0100.00716.04
7.1.330.0220.01615.81
7.1.320.0160.00714.87
7.1.310.0140.01114.96
7.1.300.0140.00914.94
7.1.290.0180.00714.93
7.1.280.0140.01114.97
7.1.270.0150.00715.02
7.1.260.0180.00314.86
7.1.250.0140.00814.93
7.1.240.0210.01215.83
7.1.230.0250.00615.76
7.1.220.0180.00915.62
7.1.210.0180.00915.76
7.1.200.0220.00715.66
7.1.190.0210.00615.70
7.1.180.0220.00615.61
7.1.170.0180.01115.76
7.1.160.0200.01415.60
7.1.150.0260.00315.66
7.1.140.0270.00315.70
7.1.130.0230.00915.69
7.1.120.0290.00815.68
7.1.110.0300.00315.60
7.1.100.0300.00415.53
7.1.90.0180.01215.67
7.1.80.0230.00515.76
7.1.70.0180.00915.57
7.1.60.0090.02215.74
7.1.50.0240.00315.63
7.1.40.0300.00715.81
7.1.30.0210.00915.66
7.1.20.0240.00815.73
7.1.10.0130.01315.89
7.1.00.0250.00415.63

preferences:
32.25 ms | 403 KiB | 5 Q