3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = 'foo the moo moo cow not the moo cow is the cow the moo cow is the cow not the moo cow bar'; print $str; print preg_replace('/(\b.*\b)\1/', '\1', $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.0140.00016.63
8.3.50.0090.00722.08
8.3.40.0070.01118.83
8.3.30.0040.01118.92
8.3.20.0040.00420.18
8.3.10.0080.00023.82
8.3.00.0090.00019.38
8.2.180.0130.00616.50
8.2.170.0140.00722.96
8.2.160.0070.00720.25
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0000.00826.16
8.2.120.0070.00022.38
8.2.110.0060.00322.34
8.2.100.0060.00618.03
8.2.90.0050.00319.21
8.2.80.0050.00317.97
8.2.70.0030.00617.63
8.2.60.0030.00617.80
8.2.50.0080.00518.07
8.2.40.0050.00318.16
8.2.30.0030.00517.99
8.2.20.0000.00717.80
8.2.10.0040.00418.01
8.2.00.0070.00317.89
8.1.280.0040.01125.92
8.1.270.0030.00623.96
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0030.00723.96
8.1.230.0110.00019.15
8.1.220.0080.00017.74
8.1.210.0000.00818.77
8.1.200.0030.00717.48
8.1.190.0080.00017.18
8.1.180.0000.00818.10
8.1.170.0000.00818.63
8.1.160.0080.00021.87
8.1.150.0040.00418.71
8.1.140.0020.00517.42
8.1.130.0000.00717.90
8.1.120.0030.00517.45
8.1.110.0040.00417.45
8.1.100.0030.00317.51
8.1.90.0040.00417.59
8.1.80.0070.00017.51
8.1.70.0030.00517.51
8.1.60.0060.00617.50
8.1.50.0030.00617.67
8.1.40.0000.00817.47
8.1.30.0030.00617.66
8.1.20.0030.00617.63
8.1.10.0020.00517.71
8.1.00.0040.00417.56
8.0.300.0070.00018.77
8.0.290.0000.00717.18
8.0.280.0060.00318.46
8.0.270.0030.00317.18
8.0.260.0030.00317.31
8.0.250.0070.00017.05
8.0.240.0000.00717.03
8.0.230.0030.00317.14
8.0.220.0000.00717.00
8.0.210.0030.00517.08
8.0.200.0000.00717.03
8.0.190.0000.00817.08
8.0.180.0040.00417.00
8.0.170.0040.00416.96
8.0.160.0070.00017.17
8.0.150.0000.00716.97
8.0.140.0000.00716.88
8.0.130.0070.00013.55
8.0.120.0030.00516.89
8.0.110.0040.00417.02
8.0.100.0030.00516.89
8.0.90.0040.00416.94
8.0.80.0030.01216.99
8.0.70.0040.00416.89
8.0.60.0050.00216.98
8.0.50.0000.00817.03
8.0.30.0080.01317.20
8.0.20.0140.00817.40
8.0.10.0040.00416.92
8.0.00.0120.00516.91
7.4.330.0070.00015.00
7.4.320.0000.00716.75
7.4.300.0000.00716.65
7.4.290.0030.00316.64
7.4.280.0000.00716.64
7.4.270.0000.00816.60
7.4.260.0000.00716.74
7.4.250.0040.00416.60
7.4.240.0020.00516.72
7.4.230.0030.00316.79
7.4.220.0030.01716.58
7.4.210.0060.01216.76
7.4.200.0000.00716.62
7.4.190.0000.00816.70
7.4.160.0060.00916.73
7.4.150.0120.00917.40
7.4.140.0100.01017.86
7.4.130.0110.00816.71
7.4.120.0060.01316.70
7.4.110.0080.01216.46
7.4.100.0060.01816.73
7.4.90.0140.00716.61
7.4.80.0080.01119.39
7.4.70.0070.01616.69
7.4.60.0120.00616.70
7.4.50.0040.00416.67
7.4.40.0070.01022.77
7.4.30.0060.01016.59
7.4.00.0060.00915.35
7.3.330.0030.00313.16
7.3.320.0050.00013.25
7.3.310.0040.00416.54
7.3.300.0030.00416.46
7.3.290.0110.00416.46
7.3.280.0090.00716.43
7.3.270.0100.01017.40
7.3.260.0060.01616.64
7.3.250.0110.01216.55
7.3.240.0070.01316.76
7.3.230.0080.00916.63
7.3.210.0110.00616.39
7.3.200.0120.00619.39
7.3.190.0110.01216.68
7.3.180.0040.01216.32
7.3.170.0030.01316.37
7.3.160.0100.00716.66
7.3.120.0030.01015.08
7.2.330.0100.01016.38
7.2.320.0090.00916.59
7.2.310.0090.01016.55
7.2.300.0220.00016.48
7.2.290.0070.01016.71
7.1.100.0060.00618.44
7.1.70.0000.01617.32
7.1.60.0040.02119.33
7.1.50.0130.01016.96
7.1.00.0130.06722.45
7.0.200.0040.00416.82
7.0.140.0030.07322.04
7.0.60.0000.06019.77
7.0.50.0070.06017.81
7.0.40.0130.08720.21
7.0.30.0230.08720.20
7.0.20.0300.04020.21
7.0.10.0030.07719.98
7.0.00.0100.07020.10
5.6.280.0030.07321.03
5.6.210.0030.06720.66
5.6.200.0030.05018.21
5.6.190.0030.05020.61
5.6.180.0430.07320.57
5.6.170.0200.07720.52
5.6.160.0070.09020.50
5.6.150.0000.09318.13
5.6.140.0130.08318.11
5.6.130.0000.07318.17
5.6.120.0030.05020.97
5.6.110.0130.07021.02
5.6.100.0130.07020.88
5.6.90.0130.08021.02
5.6.80.0000.04320.36
5.5.350.0200.04020.45
5.5.340.0100.05018.00
5.5.330.0070.06020.23
5.5.320.0300.03320.51
5.5.310.0330.04020.20
5.5.300.0130.03317.97
5.5.290.0100.08018.02
5.5.280.0100.06720.96
5.5.270.0030.04720.84
5.5.260.0030.09020.67
5.5.250.0030.04320.68
5.5.240.0070.07720.14
5.4.450.0230.07719.42
5.4.440.0270.07319.40
5.4.430.0100.04719.10
5.4.420.0170.03319.39
5.4.410.0170.07719.28
5.4.400.0200.07319.09
5.4.390.0030.06318.93
5.4.380.0230.03319.08
5.4.370.0230.03718.77
5.4.360.0270.07019.16
5.4.350.0270.06718.93
5.4.340.0130.04319.10
5.4.320.0330.06319.13
5.4.310.0270.06718.78
5.4.300.0200.03719.23
5.4.290.0470.06019.12
5.4.280.0100.05812.33
5.4.270.0270.07512.33
5.4.260.0130.08612.33
5.4.250.0090.06412.32
5.4.240.0200.09612.32
5.4.230.0150.07512.32
5.4.220.0110.07512.32
5.4.210.0120.06812.32
5.4.200.0180.07212.32
5.4.190.0160.06412.32
5.4.180.0130.05012.31
5.4.170.0090.07812.33
5.4.160.0140.06212.32
5.4.150.0140.04712.32
5.4.140.0110.06512.00
5.4.130.0150.06111.99
5.4.120.0170.07111.95
5.4.110.0100.04511.94
5.4.100.0170.05111.95
5.4.90.0130.05611.95
5.4.80.0100.05911.94
5.4.70.0080.06111.94
5.4.60.0260.07611.94
5.4.50.0100.06511.94
5.4.40.0110.05911.93
5.4.30.0260.07211.93
5.4.20.0250.08011.92
5.4.10.0110.05511.93
5.4.00.0130.08411.42
5.3.290.3870.04015.56
5.3.280.0080.08812.71
5.3.270.0190.11512.72
5.3.260.0250.07312.72
5.3.250.0120.08812.72
5.3.240.0180.08812.72
5.3.230.0230.07012.71
5.3.220.0170.12112.68
5.3.210.0260.07912.68
5.3.200.0170.08212.68
5.3.190.0150.09012.68
5.3.180.0140.09312.67
5.3.170.0290.10812.67
5.3.160.0140.05712.67
5.3.150.0130.05112.67
5.3.140.0290.06112.66
5.3.130.0150.08412.66
5.3.120.0150.08012.66
5.3.110.0230.05912.66
5.3.100.0090.04912.12
5.3.90.0180.07512.08
5.3.80.0160.06712.07
5.3.70.0400.07312.07
5.3.60.0230.09812.06
5.3.50.0280.09212.00
5.3.40.0200.05512.00
5.3.30.0230.04711.94
5.3.20.0200.08011.71
5.3.10.0160.05711.68
5.3.00.0180.07711.67
5.2.170.0140.0589.16
5.2.160.0100.0469.16
5.2.150.0100.0479.16
5.2.140.0130.0559.16
5.2.130.0300.0739.12
5.2.120.0390.1489.12
5.2.110.0110.0479.13
5.2.100.0230.0819.12
5.2.90.0130.0779.12
5.2.80.0180.0469.12
5.2.70.0100.0399.12
5.2.60.0160.0739.07
5.2.50.0150.0659.04
5.2.40.0260.0589.02
5.2.30.0240.1009.00
5.2.20.0080.0688.99
5.2.10.0050.0498.89
5.2.00.0070.0478.75
5.1.60.0070.0438.04
5.1.50.0170.0618.04
5.1.40.0170.0668.02
5.1.30.0060.0338.37
5.1.20.0120.0588.39
5.1.10.0080.0358.12
5.1.00.0000.0188.12
5.0.50.0120.0496.59
5.0.40.0100.0446.46
5.0.30.0090.0646.27
5.0.20.0170.0416.23
5.0.10.0050.0496.21
5.0.00.0040.0506.20
4.4.90.0030.0214.78
4.4.80.0050.0344.75
4.4.70.0070.0494.75
4.4.60.0060.0464.75
4.4.50.0050.0404.77
4.4.40.0080.0494.71
4.4.30.0070.0374.76
4.4.20.0040.0414.85
4.4.10.0120.0464.85
4.4.00.0090.0524.75
4.3.110.0100.0374.67
4.3.100.0090.0364.66
4.3.90.0040.0414.64
4.3.80.0080.0524.58
4.3.70.0100.0354.63
4.3.60.0110.0764.63
4.3.50.0060.0314.63
4.3.40.0090.0524.54
4.3.30.0080.0393.27
4.3.20.0040.0213.25
4.3.10.0050.0203.21
4.3.00.0100.01313.91

preferences:
48.33 ms | 401 KiB | 5 Q