3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = 'test-213-test-example-demo-1a-3321-0-3555-0'; echo trim(preg_replace('/[^\d-]+|\d+\pL+/', '', $str), '-');

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.0100.00318.43
8.3.50.0100.00718.14
8.3.40.0040.01519.15
8.3.30.0150.00018.84
8.3.20.0030.00620.86
8.3.10.0080.00022.09
8.3.00.0070.00723.48
8.2.180.0070.00716.63
8.2.170.0040.01122.96
8.2.160.0070.00722.25
8.2.150.0080.00024.18
8.2.140.0160.00024.66
8.2.130.0000.00726.16
8.2.120.0040.00426.16
8.2.110.0080.00322.15
8.2.100.0060.00617.97
8.2.90.0040.00418.00
8.2.80.0090.00017.97
8.2.70.0000.00817.88
8.2.60.0030.00517.63
8.2.50.0000.00817.98
8.2.40.0040.00418.34
8.2.30.0040.00418.12
8.2.20.0040.00418.14
8.2.10.0040.00419.15
8.2.00.0040.00419.20
8.1.280.0000.01525.92
8.1.270.0040.01124.66
8.1.260.0140.00426.35
8.1.250.0080.00028.09
8.1.240.0030.00623.98
8.1.230.0040.00719.08
8.1.220.0080.00017.79
8.1.210.0050.00318.77
8.1.200.0080.00017.48
8.1.190.0030.00617.13
8.1.180.0030.00618.10
8.1.170.0050.00317.62
8.1.160.0080.00018.82
8.1.150.0040.00418.97
8.1.140.0040.00420.77
8.1.130.0000.00819.98
8.1.120.0000.00817.59
8.1.110.0060.00317.44
8.1.100.0030.00517.61
8.1.90.0040.00417.57
8.1.80.0070.00017.52
8.1.70.0030.00317.55
8.1.60.0040.00417.65
8.1.50.0040.00417.61
8.1.40.0040.00417.64
8.1.30.0040.00417.63
8.1.20.0030.00617.63
8.1.10.0080.00317.69
8.1.00.0050.00317.61
8.0.300.0040.00419.65
8.0.290.0040.00416.75
8.0.280.0000.00718.37
8.0.270.0030.00318.14
8.0.260.0000.00620.14
8.0.250.0080.00017.09
8.0.240.0040.00416.97
8.0.230.0030.00616.99
8.0.220.0000.00717.04
8.0.210.0030.00317.02
8.0.200.0000.00817.05
8.0.190.0000.00716.89
8.0.180.0030.00517.00
8.0.170.0030.00516.99
8.0.160.0030.00516.95
8.0.150.0000.00816.93
8.0.140.0040.00416.91
8.0.130.0000.00613.44
8.0.120.0030.00516.88
8.0.110.0040.00416.92
8.0.100.0040.00416.98
8.0.90.0040.00416.93
8.0.80.0070.01316.98
8.0.70.0000.00717.04
8.0.60.0080.00016.99
8.0.50.0050.00316.90
8.0.30.0090.01517.40
8.0.20.0060.01417.12
8.0.10.0060.00317.19
8.0.00.0090.00916.90
7.4.330.0000.00516.76
7.4.320.0060.00016.73
7.4.300.0030.00316.77
7.4.290.0040.00416.71
7.4.280.0090.00016.78
7.4.270.0040.00416.84
7.4.260.0000.00613.35
7.4.250.0070.00016.80
7.4.240.0000.00716.77
7.4.230.0000.00716.92
7.4.220.0050.00316.58
7.4.210.0080.00816.78
7.4.200.0030.00316.55
7.4.130.0070.01016.70
7.4.120.0150.01316.52
7.4.110.0120.00616.70
7.4.100.0040.01616.65
7.4.90.0100.00716.76
7.4.80.0030.01319.39
7.4.70.0140.00416.69
7.4.60.0060.00916.69
7.4.50.0110.00416.61
7.4.40.0070.01016.80
7.4.10.0040.01214.84
7.4.00.0090.00915.08
7.3.330.0030.00316.36
7.3.320.0000.00513.12
7.3.310.0020.00516.34
7.3.300.0000.00616.27
7.3.290.0070.01216.26
7.3.280.0120.00315.98
7.3.260.0090.00916.23
7.3.240.0070.00916.56
7.3.230.0080.01516.45
7.3.210.0030.01716.51
7.3.200.0090.00916.57
7.3.190.0060.00916.73
7.3.180.0070.01016.32
7.3.170.0070.01016.35
7.3.160.0090.00816.28
7.3.130.0060.01414.68
7.3.120.0030.01014.68
7.3.110.0100.00314.98
7.3.100.0090.01214.76
7.3.90.0000.01514.73
7.3.80.0130.00014.63
7.3.70.0050.00914.82
7.3.60.0090.00414.74
7.3.50.0100.00314.88
7.3.40.0070.01014.88
7.3.30.0100.00514.64
7.3.20.0330.00914.58
7.3.10.0080.00714.99
7.3.00.0070.01014.86
7.2.330.0140.00316.65
7.2.320.0090.00916.81
7.2.310.0090.00616.70
7.2.300.0100.00816.54
7.2.290.0110.00716.62
7.2.260.0130.00315.00
7.2.250.0100.00415.08
7.2.240.0120.00615.06
7.2.230.0110.00415.07
7.2.220.0040.01215.04
7.2.210.0050.01015.16
7.2.200.0060.00915.15
7.2.190.0110.00415.18
7.2.180.0070.00715.04
7.2.170.0030.01015.02
7.2.160.0110.00515.11
7.2.150.0090.01115.18
7.2.140.0090.00615.00
7.2.130.0060.00915.14
7.2.120.0090.00914.78
7.2.110.0070.00714.99
7.2.100.0100.00714.93
7.2.90.0080.00815.02
7.2.80.0100.00715.05
7.2.70.0080.00815.07
7.2.60.0110.00615.18
7.2.50.0050.01015.14
7.2.40.0040.01114.91
7.2.30.0060.00915.04
7.2.20.0130.00614.93
7.2.10.0130.00315.02
7.2.00.0110.00415.13

preferences:
59.49 ms | 400 KiB | 5 Q