3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = 'test-qwe123-test-example-demo-1a-3321-0-3555-0'; echo preg_replace('/(?!([\d-]+(?!\w))).-?/', '', $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.0040.01118.41
8.3.50.0070.01018.08
8.3.40.0190.00318.67
8.3.30.0140.00718.83
8.3.20.0040.00420.91
8.3.10.0000.00722.09
8.3.00.0080.00023.61
8.2.180.0070.01016.35
8.2.170.0130.00622.96
8.2.160.0000.01522.14
8.2.150.0040.00424.18
8.2.140.0090.00024.66
8.2.130.0080.00826.16
8.2.120.0030.00626.16
8.2.110.0030.00621.17
8.2.100.0060.00617.93
8.2.90.0040.00419.34
8.2.80.0040.00417.97
8.2.70.0040.00417.50
8.2.60.0000.00818.04
8.2.50.0050.00318.07
8.2.40.0050.00319.88
8.2.30.0040.00418.01
8.2.20.0000.00718.12
8.2.10.0000.00719.13
8.2.00.0000.00819.16
8.1.280.0100.00325.92
8.1.270.0060.00322.51
8.1.260.0080.00026.35
8.1.250.0000.00728.09
8.1.240.0070.00322.62
8.1.230.0110.00018.83
8.1.220.0040.00417.76
8.1.210.0030.00518.77
8.1.200.0060.00317.35
8.1.190.0040.00417.35
8.1.180.0030.00618.10
8.1.170.0090.00318.76
8.1.160.0040.00418.86
8.1.150.0000.00719.05
8.1.140.0040.00420.63
8.1.130.0000.00720.02
8.1.120.0040.00417.46
8.1.110.0050.00317.50
8.1.100.0040.00417.59
8.1.90.0000.00817.53
8.1.80.0040.00417.53
8.1.70.0000.00717.58
8.1.60.0040.00417.71
8.1.50.0000.00817.49
8.1.40.0030.00617.68
8.1.30.0000.00917.58
8.1.20.0030.00617.66
8.1.10.0030.00617.54
8.1.00.0000.00817.60
8.0.300.0040.00418.77
8.0.290.0030.00816.88
8.0.280.0040.00418.47
8.0.270.0000.00718.14
8.0.260.0030.00319.97
8.0.250.0070.00017.01
8.0.240.0080.00016.98
8.0.230.0040.00416.94
8.0.220.0000.00717.01
8.0.210.0030.00316.95
8.0.200.0050.00216.93
8.0.190.0030.00317.01
8.0.180.0000.00816.91
8.0.170.0040.00417.01
8.0.160.0000.00717.10
8.0.150.0040.00416.96
8.0.140.0030.00316.83
8.0.130.0030.00313.45
8.0.120.0000.00816.92
8.0.110.0050.00216.76
8.0.100.0000.00716.78
8.0.90.0060.00316.86
8.0.80.0040.01216.99
8.0.70.0040.00416.76
8.0.60.0000.00717.02
8.0.50.0040.00417.00
8.0.30.0130.01017.43
8.0.20.0130.00617.05
8.0.10.0000.00817.02
8.0.00.0060.01216.89
7.4.330.0000.00516.80
7.4.320.0000.00616.73
7.4.300.0000.00616.64
7.4.290.0070.00016.64
7.4.280.0040.00416.75
7.4.270.0070.00016.76
7.4.260.0030.00313.44
7.4.250.0000.00716.68
7.4.240.0040.00316.66
7.4.230.0030.00316.46
7.4.220.0030.00416.75
7.4.210.0060.00816.76
7.4.200.0040.00416.84
7.4.130.0090.01016.72
7.4.120.0210.00016.60
7.4.110.0100.00716.82
7.4.100.0120.00616.56
7.4.90.0130.00416.64
7.4.80.0070.01119.39
7.4.70.0060.01016.61
7.4.60.0030.01316.57
7.4.50.0070.00716.61
7.4.40.0110.00716.88
7.4.10.0060.01614.99
7.4.00.0050.01015.20
7.3.330.0000.00716.34
7.3.320.0030.00313.20
7.3.310.0000.00616.38
7.3.300.0070.00016.30
7.3.290.0090.00916.34
7.3.280.0070.00716.36
7.3.260.0090.01216.53
7.3.240.0100.00616.51
7.3.230.0060.01216.71
7.3.210.0030.01716.45
7.3.200.0070.01016.59
7.3.190.0060.01616.34
7.3.180.0030.01416.46
7.3.170.0150.00316.59
7.3.160.0140.00316.36
7.3.130.0030.00914.51
7.3.120.0160.00014.92
7.3.110.0130.00714.76
7.3.100.0120.01114.73
7.3.90.0100.00914.63
7.3.80.0100.00314.52
7.3.70.0090.00614.82
7.3.60.0100.00514.50
7.3.50.0030.01214.91
7.3.40.0180.00014.77
7.3.30.0050.00814.80
7.3.20.0060.00714.93
7.3.10.0120.00314.68
7.3.00.0070.01014.94
7.2.330.0000.01616.61
7.2.320.0160.00716.57
7.2.310.0130.00316.71
7.2.300.0160.00516.60
7.2.290.0080.00816.82
7.2.260.0090.00614.79
7.2.250.0120.00514.79
7.2.240.0090.00915.11
7.2.230.0060.01515.04
7.2.220.0040.01615.09
7.2.210.0050.00914.89
7.2.200.0060.00914.70
7.2.190.0120.00614.70
7.2.180.0000.01515.15
7.2.170.0060.00914.83
7.2.160.0090.00615.04
7.2.150.0060.00914.85
7.2.140.0470.01214.84
7.2.130.0090.00615.14
7.2.120.0040.01115.09
7.2.110.0070.00714.96
7.2.100.0160.00315.07
7.2.90.0070.00715.10
7.2.80.0140.00014.82
7.2.70.0030.01115.16
7.2.60.0100.00514.94
7.2.50.0110.00715.00
7.2.40.0000.01614.86
7.2.30.0110.00615.00
7.2.20.0120.00615.07
7.2.10.0070.00715.13
7.2.00.0060.01014.95

preferences:
56.79 ms | 400 KiB | 5 Q