3v4l.org

run code in 300+ PHP versions simultaneously
<?php $origString = 'My-Cool-String - 201'; $newString = preg_replace("/-(?=.* -)/", ' ', $origString); echo $newString;

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.80.0030.00619.36
8.3.70.0000.01516.75
8.3.60.0070.01418.43
8.3.50.0050.00923.71
8.3.40.0100.00718.86
8.3.30.0060.00918.92
8.3.20.0080.00021.81
8.3.10.0000.00821.95
8.3.00.0000.00823.56
8.2.200.0110.00018.88
8.2.190.0160.00316.58
8.2.180.0120.00918.53
8.2.170.0090.00622.96
8.2.160.0080.00820.48
8.2.150.0000.00824.18
8.2.140.0050.00324.66
8.2.130.0080.00026.16
8.2.120.0040.00419.69
8.2.110.0000.00921.20
8.2.100.0070.00717.84
8.2.90.0030.00517.75
8.2.80.0040.00420.77
8.2.70.0050.00317.88
8.2.60.0050.00317.80
8.2.50.0030.00618.07
8.2.40.0000.00818.08
8.2.30.0000.00819.54
8.2.20.0040.00418.14
8.2.10.0000.00719.25
8.2.00.0040.00419.38
8.1.290.0090.00030.84
8.1.280.0120.00325.92
8.1.270.0080.00023.96
8.1.260.0000.00826.35
8.1.250.0000.00828.09
8.1.240.0090.00023.84
8.1.230.0080.00317.70
8.1.220.0040.00417.79
8.1.210.0090.00018.77
8.1.200.0040.00417.48
8.1.190.0030.00717.35
8.1.180.0000.01018.10
8.1.170.0060.00318.57
8.1.160.0040.00418.92
8.1.150.0040.00418.75
8.1.140.0000.00820.77
8.1.130.0040.00420.30
8.1.120.0000.00717.54
8.1.110.0050.00317.43
8.1.100.0000.00817.61
8.1.90.0000.00717.58
8.1.80.0060.00317.56
8.1.70.0000.00717.59
8.1.60.0050.00317.56
8.1.50.0040.00417.62
8.1.40.0050.00517.58
8.1.30.0000.00917.75
8.1.20.0080.00017.69
8.1.10.0000.00817.67
8.1.00.0040.00417.64
8.0.300.0080.00018.77
8.0.290.0040.00416.88
8.0.280.0040.00418.47
8.0.270.0000.00718.15
8.0.260.0030.00320.00
8.0.250.0030.00317.12
8.0.240.0070.00017.02
8.0.230.0030.00317.07
8.0.220.0030.00317.02
8.0.210.0030.00516.96
8.0.200.0030.00317.05
8.0.190.0000.00816.93
8.0.180.0050.00316.90
8.0.170.0060.00316.83
8.0.160.0020.00516.99
8.0.150.0080.00016.92
8.0.140.0000.00816.95
8.0.130.0030.00313.34
8.0.120.0040.00515.13
8.0.110.0050.00715.22
8.0.100.0050.00615.13
8.0.90.0090.00415.07
8.0.80.0090.00615.77
8.0.70.0070.00515.16
8.0.60.0080.00415.10
8.0.50.0070.00415.18
8.0.30.0110.00615.35
8.0.20.0110.00715.32
8.0.10.0060.00615.30
8.0.00.0050.00815.22
7.4.330.0050.00016.78
7.4.320.0060.00016.76
7.4.300.0030.00316.75
7.4.290.0000.00716.66
7.4.280.0030.00616.79
7.4.270.0040.00416.74
7.4.260.0040.00416.71
7.4.250.0090.00515.04
7.4.240.0110.00215.07
7.4.230.0080.00415.94
7.4.220.0060.00415.57
7.4.210.0070.00716.06
7.4.200.0060.00614.95
7.4.190.0170.00013.46
7.4.180.0110.00813.46
7.4.160.0120.00513.52
7.4.150.0120.00513.45
7.4.140.0160.00615.58
7.4.130.0140.00714.94
7.4.120.0110.00614.98
7.4.110.0150.00715.00
7.4.100.0120.00515.06
7.4.90.0150.00315.05
7.4.80.0150.00616.38
7.4.70.0170.00415.05
7.4.60.0100.00614.97
7.4.50.0100.00515.04
7.4.40.0080.01014.97
7.4.30.0110.00613.39
7.4.20.0100.00715.58
7.4.10.0110.00715.02
7.4.00.0120.00614.91
7.3.330.0000.00613.18
7.3.320.0080.00013.17
7.3.310.0070.00514.79
7.3.300.0070.00514.77
7.3.290.0070.00815.52
7.3.280.0160.00013.28
7.3.270.0190.00013.21
7.3.260.0110.00514.95
7.3.250.0120.00613.14
7.3.240.0130.00713.23
7.3.230.0150.00314.95
7.3.220.0160.00313.21
7.3.210.0100.00814.93
7.3.200.0140.00114.95
7.3.190.0080.00414.85
7.3.180.0140.00314.75
7.3.170.0080.00814.70
7.3.160.0130.00714.79
7.3.150.0060.00913.12
7.3.140.0090.00512.98
7.3.130.0100.00814.88
7.3.120.0130.00614.77
7.3.110.0160.00414.79
7.3.100.0150.00414.72
7.3.90.0130.00614.90
7.3.80.0150.00614.85
7.3.70.0090.00914.85
7.3.60.0100.00714.85
7.3.50.0110.00814.78
7.3.40.0110.01014.79
7.3.30.0080.00814.87
7.3.20.0120.00714.91
7.3.10.0140.00514.80
7.3.00.0170.00714.89
7.2.340.0130.00313.34
7.2.330.0100.01014.97
7.2.320.0100.00714.96
7.2.310.0110.00715.03
7.2.300.0120.00815.02
7.2.290.0140.00314.96
7.2.280.0130.00413.32
7.2.270.0060.01113.40
7.2.260.0110.00714.93
7.2.250.0130.00715.09
7.2.240.0140.00714.99
7.2.230.0130.00614.98
7.2.220.0150.00414.97
7.2.210.0140.00514.98
7.2.200.0090.01314.99
7.2.190.0100.00814.98
7.2.180.0110.00815.01
7.2.170.0080.00914.98
7.2.160.0100.01015.05
7.2.150.0140.00515.10
7.2.140.0180.00115.08
7.2.130.0090.01115.14
7.2.120.0140.00815.01
7.2.110.0100.01115.07
7.2.100.0220.00515.06
7.2.90.0120.00915.08
7.2.80.0150.00715.03
7.2.70.0110.00715.11
7.2.60.0160.00615.04
7.2.50.0110.01114.99
7.2.40.0100.01215.20
7.2.30.0100.00915.10
7.2.20.0100.01015.07
7.2.10.0160.00315.02
7.2.00.0100.01015.10

preferences:
53.54 ms | 401 KiB | 5 Q