3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = "it is a test string."; echo preg_replace(['~\Ar~', '~.{3}\K(?>r|.(*SKIP)(?!))~'], 'm', $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.130.0060.00318.40
8.3.120.0040.00420.76
8.3.110.0060.00316.75
8.3.100.0080.01220.46
8.3.90.0080.00018.43
8.3.80.0040.00718.31
8.3.70.0160.00018.38
8.3.60.0180.00018.31
8.3.50.0100.00718.37
8.3.40.0130.00318.87
8.3.30.0060.01518.79
8.3.20.0070.00020.22
8.3.10.0030.00623.30
8.3.00.0000.00823.61
8.2.250.0000.00817.13
8.2.240.0030.00618.96
8.2.230.0030.00620.94
8.2.220.0060.00324.06
8.2.210.0070.01126.77
8.2.200.0000.01118.79
8.2.190.0100.00716.63
8.2.180.0110.00418.50
8.2.170.0040.01222.96
8.2.160.0110.00420.15
8.2.150.0040.00424.18
8.2.140.0090.00024.66
8.2.130.0060.00326.16
8.2.120.0030.00619.89
8.2.110.0060.00321.24
8.2.100.0040.00717.97
8.2.90.0040.00418.98
8.2.80.0100.00017.97
8.2.70.0000.00817.90
8.2.60.0040.00418.09
8.2.50.0040.00418.10
8.2.40.0060.00321.15
8.2.30.0080.00019.23
8.2.20.0000.00718.07
8.2.10.0050.00317.89
8.2.00.0020.00518.02
8.1.300.0080.00818.60
8.1.290.0040.00418.88
8.1.280.0120.00325.92
8.1.270.0080.00023.92
8.1.260.0080.00026.35
8.1.250.0000.00828.09
8.1.240.0100.00019.32
8.1.230.0090.00318.96
8.1.220.0000.00817.79
8.1.210.0000.00818.77
8.1.200.0090.00017.35
8.1.190.0040.00417.35
8.1.180.0030.00618.10
8.1.170.0000.00818.59
8.1.160.0000.00718.89
8.1.150.0000.00818.86
8.1.140.0070.00019.09
8.1.130.0030.00618.76
8.1.120.0040.00417.54
8.1.110.0000.00717.55
8.1.100.0090.00017.52
8.1.90.0040.00817.61
8.1.80.0030.00717.45
8.1.70.0000.00717.57
8.1.60.0030.00717.68
8.1.50.0040.00417.63
8.1.40.0080.00017.64
8.1.30.0080.00017.77
8.1.20.0040.00717.79
8.1.10.0060.00317.66
8.1.00.0050.00317.59
8.0.300.0080.00018.96
8.0.290.0080.00016.75
8.0.280.0000.00718.48
8.0.270.0040.00417.03
8.0.260.0070.00018.90
8.0.250.0000.00817.13
8.0.240.0000.00817.11
8.0.230.0030.00517.02
8.0.220.0090.00017.00
8.0.210.0000.00717.00
8.0.200.0000.00717.04
8.0.190.0030.00717.10
8.0.180.0000.00716.89
8.0.170.0030.00516.92
8.0.160.0030.00417.03
8.0.150.0070.00016.98
8.0.140.0030.00716.99
8.0.130.0000.00613.41
8.0.120.0000.00816.80
8.0.110.0000.00816.97
8.0.100.0000.00716.86
8.0.90.0040.00416.88
8.0.80.0130.00716.99
8.0.70.0090.00016.80
8.0.60.0000.01016.92
8.0.50.0040.00416.99
8.0.30.0130.00417.08
8.0.20.0100.00917.40
8.0.10.0000.00717.13
8.0.00.0090.00916.73
7.4.330.0050.00016.91
7.4.320.0000.00616.66
7.4.300.0030.00316.64
7.4.290.0000.00716.72
7.4.280.0060.00616.79
7.4.270.0000.00816.72
7.4.260.0030.00516.77
7.4.250.0030.00516.64
7.4.240.0030.00316.68
7.4.230.0070.00016.68
7.4.220.0000.00716.85
7.4.210.0080.00816.72
7.4.200.0000.00816.79
7.4.160.0090.00916.76
7.4.150.0100.01017.40
7.4.140.0060.01317.86
7.4.130.0150.00716.89
7.4.120.0100.01016.58
7.4.110.0140.00416.55
7.4.100.0110.00716.77
7.4.90.0030.01316.64
7.4.80.0130.00719.39
7.4.70.0100.00716.74
7.4.60.0090.00616.64
7.4.50.0040.01516.48
7.4.40.0140.00316.55
7.4.30.0090.01016.66
7.4.00.0070.00814.90
7.3.330.0050.00013.12
7.3.320.0000.00613.13
7.3.310.0000.00716.33
7.3.300.0030.00316.27
7.3.290.0000.00716.08
7.3.280.0120.00616.31
7.3.270.0040.01517.40
7.3.260.0100.01016.39
7.3.250.0140.00716.38
7.3.240.0080.01316.36
7.3.230.0100.00716.65
7.3.210.0070.01016.35
7.3.200.0100.00716.67
7.3.190.0040.01116.45
7.3.180.0130.01016.36
7.3.170.0080.00916.36
7.3.160.0060.00916.26
7.3.120.0090.00614.77
7.3.110.0080.00414.86
7.3.100.0000.01415.15
7.3.90.0060.00615.10
7.3.80.0040.00715.10
7.3.70.0100.00314.96
7.3.60.0040.01115.00
7.3.50.0070.01014.55
7.3.40.0040.01214.73
7.3.30.0030.00614.95
7.3.20.0060.00816.59
7.3.10.0040.01116.85
7.3.00.0170.00016.79
7.2.330.0110.00716.63
7.2.320.0110.01116.82
7.2.310.0100.01016.47
7.2.300.0120.00616.61
7.2.290.0070.01016.71
7.2.250.0090.00915.12
7.2.240.0030.01215.05
7.2.230.0000.01415.12
7.2.220.0060.00915.08
7.2.210.0000.01415.13
7.2.200.0030.01015.04
7.2.190.0040.01115.24
7.2.180.0030.01315.16
7.2.170.0030.00714.76
7.2.60.0080.00016.53
7.1.330.0030.01315.92
7.1.320.0030.01015.77
7.1.310.0030.00915.84
7.1.300.0030.01415.95
7.1.290.0030.00915.95
7.1.280.0040.00815.85
7.1.270.0000.01715.77
7.1.260.0070.00315.89
7.1.200.0030.01215.88
7.1.110.0520.01016.46
7.1.100.0460.01216.02
7.1.90.0670.01216.20
7.1.80.0580.01315.86
7.1.70.0990.00615.46
7.1.60.0730.01733.41
7.1.50.1050.00732.89
7.1.40.1030.01332.79
7.1.30.1510.01032.79
7.1.20.0750.01732.98
7.1.10.0570.01614.95
7.1.00.0500.01215.02
7.0.250.0960.00715.82
7.0.240.0480.01015.80
7.0.230.0690.00615.57
7.0.220.0690.00315.77
7.0.210.0800.00314.89
7.0.200.0650.01514.68
7.0.190.1150.01515.03
7.0.180.0860.00914.46
7.0.170.1390.01014.56
7.0.160.0970.01014.46
7.0.150.0940.00914.50
7.0.140.0720.01614.59
7.0.130.0470.01314.73
7.0.120.0710.01214.72
7.0.110.0660.00814.57
7.0.100.0590.01014.51
7.0.90.0480.01114.55
7.0.80.0610.00914.54
7.0.70.0610.00314.46
7.0.60.0910.01414.61
7.0.50.0440.00914.46
7.0.40.0940.01015.02
7.0.30.0920.01614.82
7.0.20.0920.01914.50
7.0.10.0740.00914.75
7.0.00.0960.01014.64

preferences:
27.95 ms | 403 KiB | 5 Q