3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = ' The quick brown fox jumped over the lazy dog.'; $patterns = array(); $patterns[0] = '/^\s*/'; $patterns[1] = '/brown/'; $patterns[2] = '/fox/'; $replacements = array(); $replacements[0] = ''; echo preg_replace($patterns, $replacements, $string); ?>

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.70.0160.00318.56
8.3.60.0130.00318.30
8.3.50.0090.01022.01
8.3.40.0040.01119.09
8.3.30.0050.00919.02
8.3.20.0040.00420.20
8.3.10.0040.00421.71
8.3.00.0000.00920.82
8.2.190.0100.00616.62
8.2.180.0090.00616.63
8.2.170.0100.01022.96
8.2.160.0100.00322.24
8.2.150.0050.00324.18
8.2.140.0030.00624.66
8.2.130.0040.00426.16
8.2.120.0000.00819.88
8.2.110.0060.00319.21
8.2.100.0110.00018.03
8.2.90.0040.00419.17
8.2.80.0040.00417.97
8.2.70.0060.00317.88
8.2.60.0090.00017.91
8.2.50.0070.00318.07
8.2.40.0030.00518.34
8.2.30.0000.00718.07
8.2.20.0000.00817.98
8.2.10.0000.00817.96
8.2.00.0040.00417.73
8.1.280.0100.01325.92
8.1.270.0150.00318.94
8.1.260.0050.00226.35
8.1.250.0110.00428.09
8.1.240.0000.01219.62
8.1.230.0090.00317.64
8.1.220.0000.00917.77
8.1.210.0060.00318.77
8.1.200.0060.00317.35
8.1.190.0080.00017.35
8.1.180.0040.00418.10
8.1.170.0030.00620.50
8.1.160.0040.00421.96
8.1.150.0070.00018.90
8.1.140.0000.00717.47
8.1.130.0030.00317.86
8.1.120.0040.00417.55
8.1.110.0030.00517.54
8.1.100.0020.00517.57
8.1.90.0020.00517.57
8.1.80.0000.00817.44
8.1.70.0000.00717.50
8.1.60.0000.00917.58
8.1.50.0070.00017.53
8.1.40.0030.00617.60
8.1.30.0030.00617.77
8.1.20.0080.00017.72
8.1.10.0040.00417.73
8.1.00.0000.00817.73
8.0.300.0090.00018.77
8.0.290.0040.00416.88
8.0.280.0040.00418.38
8.0.270.0050.00317.27
8.0.260.0060.00317.28
8.0.250.0030.00317.07
8.0.240.0030.00316.97
8.0.230.0070.00017.03
8.0.220.0030.00316.98
8.0.210.0020.00516.98
8.0.200.0080.00016.96
8.0.190.0040.00417.02
8.0.180.0040.00416.89
8.0.170.0080.00016.88
8.0.160.0040.00416.95
8.0.150.0030.00316.91
8.0.140.0060.00316.96
8.0.130.0030.00313.36
8.0.120.0050.00316.84
8.0.110.0040.00416.81
8.0.100.0040.00416.77
8.0.90.0000.00716.95
8.0.80.0030.01217.00
8.0.70.0040.00416.88
8.0.60.0040.00416.86
8.0.50.0040.00416.88
8.0.30.0100.01217.25
8.0.20.0110.00917.40
8.0.10.0000.00717.14
8.0.00.0160.00516.85
7.4.330.0050.00015.03
7.4.320.0050.00216.66
7.4.300.0030.00316.73
7.4.290.0000.00716.75
7.4.280.0000.00916.63
7.4.270.0000.00716.75
7.4.260.0030.00316.62
7.4.250.0070.00316.63
7.4.240.0050.00216.70
7.4.230.0000.00716.85
7.4.220.0130.01316.65
7.4.210.0090.01016.73
7.4.200.0000.00716.78
7.4.160.0040.01116.89
7.4.150.0180.00917.40
7.4.140.0160.01917.86
7.4.130.0140.00716.80
7.4.120.0140.00316.67
7.4.110.0140.00716.62
7.4.100.0200.03316.81
7.4.90.0120.00916.79
7.4.80.0160.00016.55
7.4.70.0060.01216.60
7.4.60.0110.00716.52
7.4.50.0060.00316.69
7.4.40.0130.00316.68
7.4.30.0170.00716.67
7.4.00.0120.00315.12
7.3.330.0000.00513.20
7.3.320.0080.00813.24
7.3.310.0000.00716.40
7.3.300.0000.00816.39
7.3.290.0040.00416.34
7.3.280.0120.00716.37
7.3.270.0090.00917.40
7.3.260.0170.00016.29
7.3.250.0100.00816.50
7.3.240.0090.00816.43
7.3.230.0060.01916.65
7.3.210.0090.00916.48
7.3.200.0140.01119.39
7.3.190.0070.01016.42
7.3.180.0030.01716.43
7.3.170.0070.01016.68
7.3.160.0100.00716.46
7.2.330.0110.00616.66
7.2.320.0100.00716.69
7.2.310.0090.00816.77
7.2.300.0070.01016.58
7.2.290.0080.01516.80
7.2.00.0260.00619.50
7.1.200.0040.00815.86
7.1.70.0030.00517.37
7.1.60.0120.00317.32
7.1.50.0150.00835.00
7.1.00.0030.07722.26
7.0.200.0070.01016.97
7.0.140.0000.07722.08
7.0.60.0000.04319.95
7.0.50.0070.08017.88
7.0.40.0100.06720.07
7.0.30.0230.08720.18
7.0.20.0330.08320.21
7.0.10.0000.05320.32
7.0.00.0100.05320.18
5.6.280.0000.07721.03
5.6.210.0000.04320.64
5.6.200.0100.07718.13
5.6.190.0070.09020.45
5.6.180.0430.06720.27
5.6.170.0170.04020.41
5.6.160.0200.06720.51
5.6.150.0100.08018.21
5.6.140.0100.04318.17
5.6.130.0000.09018.08
5.6.120.0070.08020.89
5.6.110.0030.07020.88
5.6.100.0100.07721.13
5.6.90.0100.06721.02
5.6.80.0200.07720.35
5.5.350.0270.08320.40
5.5.340.0000.04717.91
5.5.330.0070.04020.23
5.5.320.0030.06020.15
5.5.310.0300.05720.31
5.5.300.0030.06718.01
5.5.290.0030.07718.02
5.5.280.0030.05720.97
5.5.270.0100.08020.84
5.5.260.0200.07320.88
5.5.250.0070.03720.65
5.5.240.0100.03020.03
5.4.450.0570.06019.40
5.4.440.1100.05319.55
5.4.430.0070.05719.63
5.4.420.0400.06319.45
5.4.410.0930.05719.34
5.4.400.0830.07018.80
5.4.390.0200.06018.65
5.4.380.0170.06018.56
5.4.370.0170.05318.56
5.4.360.0270.04718.65
5.4.350.0300.05018.56
5.4.340.0270.06718.68
5.4.320.0270.05718.73
5.4.310.0170.05318.62
5.4.300.0230.07318.78
5.4.290.0170.07018.51
5.4.280.0170.06018.47
5.4.270.0170.06018.39
5.4.260.0230.05018.66
5.4.250.0270.05718.47
5.4.240.0300.05318.45
5.4.230.0230.05018.50
5.4.220.0300.05718.47
5.4.210.0330.05718.65
5.4.200.0230.05316.50
5.4.190.0230.05018.49
5.4.180.0270.05018.70
5.4.170.0230.05318.48
5.4.160.0270.06718.66
5.4.150.0230.05018.64
5.4.140.0300.04316.13
5.4.130.0200.05016.31
5.4.120.0270.06716.07
5.4.110.0170.05316.36
5.4.100.0230.05016.12
5.4.90.0270.04316.32
5.4.80.0170.05316.16
5.4.70.0230.04716.28
5.4.60.0230.04316.14
5.4.50.0200.05316.13
5.4.40.0130.05716.32
5.4.30.0200.04716.14
5.4.20.0200.06016.16
5.4.10.0200.05016.22
5.4.00.0130.05315.70
5.3.290.0170.06014.73
5.3.280.0100.06014.66
5.3.270.0270.05014.56
5.3.260.0130.06314.60
5.3.250.0170.05314.53
5.3.240.0370.04714.60
5.3.230.0200.05014.51
5.3.220.0400.05014.72
5.3.210.0300.05314.63
5.3.200.0170.05714.64
5.3.190.0270.05714.52
5.3.180.0370.04314.53
5.3.170.0170.05314.53
5.3.160.0230.04314.55
5.3.150.0270.06314.54
5.3.140.0330.05714.63
5.3.130.0170.07714.53
5.3.120.0170.06314.70
5.3.110.0070.06714.54
5.3.100.0230.04713.96
5.3.90.0200.05313.95
5.3.80.0130.05713.94
5.3.70.0330.05014.00
5.3.60.0230.05713.95
5.3.50.0130.07013.94
5.3.40.0270.06014.02
5.3.30.0230.05713.89
5.3.20.0170.04713.79
5.3.10.0200.04313.64
5.3.00.0130.05313.71
5.2.170.0070.05011.11
5.2.160.0200.05011.29
5.2.150.0230.04711.16
5.2.140.0230.04711.09
5.2.130.0130.05311.23
5.2.120.0200.04711.23
5.2.110.0130.05011.08
5.2.100.0100.04011.12
5.2.90.0200.04311.17
5.2.80.0130.04311.13
5.2.70.0100.04311.07
5.2.60.0100.04311.01
5.2.50.0130.04011.05
5.2.40.0070.04311.03
5.2.30.0070.06010.94
5.2.20.0070.04010.89
5.2.10.0170.04710.95
5.2.00.0170.04310.85
5.1.60.0030.04310.11
5.1.50.0100.03310.01
5.1.40.0100.03310.10
5.1.30.0100.04010.43
5.1.20.0100.03710.32
5.1.10.0130.03310.11
5.1.00.0130.03710.08
5.0.50.0070.0338.66
5.0.40.0100.0278.47
5.0.30.0100.0508.19
5.0.20.0030.0338.38
5.0.10.0030.0308.20
5.0.00.0030.0478.29
4.4.90.0070.0306.90
4.4.80.0030.0336.90
4.4.70.0130.0236.90
4.4.60.0070.0276.90
4.4.50.0100.0276.90
4.4.40.0100.0406.90
4.4.30.0030.0336.90
4.4.20.0070.0276.90
4.4.10.0030.0306.90
4.4.00.0030.0376.90
4.3.110.0100.0276.90
4.3.100.0070.0236.90
4.3.90.0100.0136.90
4.3.80.0030.0376.90
4.3.70.0070.0276.90
4.3.60.0030.0306.90
4.3.50.0030.0336.90
4.3.40.0000.0476.90
4.3.30.0000.0306.90
4.3.20.0030.0236.90
4.3.10.0030.0236.90
4.3.00.0200.02314.42

preferences:
34.15 ms | 401 KiB | 5 Q