3v4l.org

run code in 300+ PHP versions simultaneously
<?php $patterns = ['/\bhim\b/', '/\bhimself\b/', '/\bhe\b/', '/\bhis\b/']; $replacements = ['her', 'herself', 'she', 'her']; $str = 'he went by "himself" (his imaginary friend came with him) to the himalayas. this was not the first time in history '; echo preg_replace($patterns, $replacements, $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.0080.00816.49
8.3.50.0100.00718.36
8.3.40.0210.00018.96
8.3.30.0080.00819.04
8.3.20.0030.00620.29
8.3.10.0040.00421.85
8.3.00.0050.00219.20
8.2.180.0150.00616.59
8.2.170.0110.01118.91
8.2.160.0070.00722.96
8.2.150.0090.00024.18
8.2.140.0050.00324.66
8.2.130.0000.00726.16
8.2.120.0030.00519.79
8.2.110.0100.00019.09
8.2.100.0060.00617.84
8.2.90.0110.00019.25
8.2.80.0030.00517.97
8.2.70.0060.00317.63
8.2.60.0040.00417.93
8.2.50.0030.00618.07
8.2.40.0030.00518.22
8.2.30.0070.00018.18
8.2.20.0040.00417.83
8.2.10.0040.00418.09
8.2.00.0060.00317.71
8.1.280.0120.00925.92
8.1.270.0050.00318.88
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0040.00421.13
8.1.230.0090.00321.03
8.1.220.0040.00417.74
8.1.210.0040.00418.77
8.1.200.0070.00317.22
8.1.190.0040.00417.35
8.1.180.0080.00018.10
8.1.170.0040.00418.67
8.1.160.0000.00822.05
8.1.150.0040.00418.86
8.1.140.0000.00917.55
8.1.130.0070.00017.51
8.1.120.0000.00717.53
8.1.110.0000.00817.54
8.1.100.0040.00417.51
8.1.90.0000.00817.46
8.1.80.0040.00417.55
8.1.70.0000.00717.58
8.1.60.0040.00717.68
8.1.50.0000.00817.61
8.1.40.0030.00617.54
8.1.30.0030.00517.59
8.1.20.0000.00817.73
8.1.10.0030.00517.51
8.1.00.0040.00717.50
8.0.300.0060.00318.77
8.0.290.0050.00216.75
8.0.280.0030.00318.55
8.0.270.0000.00717.20
8.0.260.0040.00416.88
8.0.250.0000.00917.13
8.0.240.0040.00417.13
8.0.230.0000.00717.06
8.0.220.0000.00716.93
8.0.210.0050.00216.87
8.0.200.0000.00617.09
8.0.190.0040.00417.06
8.0.180.0000.00816.90
8.0.170.0000.00817.05
8.0.160.0070.00016.97
8.0.150.0000.00716.91
8.0.140.0070.00316.85
8.0.130.0000.00713.40
8.0.120.0050.00316.90
8.0.110.0000.00816.95
8.0.100.0000.00716.95
8.0.90.0070.00016.86
8.0.80.0040.01116.96
8.0.70.0060.00316.99
8.0.60.0070.00016.76
8.0.50.0070.00016.93
8.0.30.0110.01417.14
8.0.20.0110.01317.40
8.0.10.0070.00016.91
8.0.00.0120.00616.93
7.4.330.0000.00715.05
7.4.320.0030.00316.66
7.4.300.0040.00416.73
7.4.290.0030.00316.71
7.4.280.0030.00616.72
7.4.270.0030.00316.82
7.4.260.0030.00716.75
7.4.250.0000.00716.63
7.4.240.0040.00416.72
7.4.230.0030.00416.54
7.4.220.0120.00616.71
7.4.210.0030.01216.62
7.4.200.0030.00316.55
7.4.160.0080.00816.41
7.4.150.0060.01217.40
7.4.140.0150.01017.86
7.4.130.0090.00816.82
7.4.120.0120.00516.68
7.4.110.0160.00616.63
7.4.100.0060.01616.40
7.4.90.0120.01116.57
7.4.80.0100.00719.39
7.4.70.0170.00016.57
7.4.60.0060.01216.64
7.4.50.0050.00016.52
7.4.40.0080.00816.66
7.4.30.0030.01616.66
7.4.00.0070.01114.91
7.3.330.0050.00013.21
7.3.320.0060.00013.17
7.3.310.0000.00616.33
7.3.300.0060.00316.12
7.3.290.0140.00216.30
7.3.280.0050.01316.28
7.3.270.0090.01517.40
7.3.260.0090.00916.43
7.3.250.0130.00616.63
7.3.240.0130.00416.50
7.3.230.0130.00516.39
7.3.210.0120.00316.59
7.3.200.0160.00319.39
7.3.190.0110.00516.51
7.3.180.0100.00716.58
7.3.170.0120.00616.53
7.3.160.0140.00616.36
7.3.10.0030.00616.59
7.3.00.0070.00716.64
7.2.330.0090.00616.63
7.2.320.0070.01016.61
7.2.310.0030.01716.70
7.2.300.0090.00916.61
7.2.290.0130.01016.61
7.2.130.0070.00717.13
7.2.120.0070.00716.68
7.2.110.0080.00317.00
7.2.100.0150.00017.05
7.2.90.0090.00617.07
7.2.80.0030.01017.07
7.2.70.0000.01216.90
7.2.60.0100.00517.04
7.2.50.0030.00716.92
7.2.40.0060.00917.11
7.2.30.0120.00317.09
7.2.20.0030.00717.01
7.2.10.0100.00316.64
7.2.00.0050.00718.22
7.1.250.0090.00615.73
7.1.200.0070.00715.75
7.1.100.0060.00618.31
7.1.70.0000.01017.33
7.1.60.0160.01019.46
7.1.50.0130.01016.83
7.1.00.0030.07722.38
7.0.200.0220.00014.66
7.0.140.0030.07321.96
7.0.60.0270.05019.93
7.0.50.0100.08317.68
7.0.40.0130.08020.14
7.0.30.0270.06720.12
7.0.20.0230.05020.22
7.0.10.0100.08320.35
7.0.00.0100.07020.02
5.6.280.0100.06320.81
5.6.210.0130.07020.74
5.6.200.0030.05318.09
5.6.190.0000.09020.43
5.6.180.0500.06720.35
5.6.170.0270.07720.76
5.6.160.0100.08018.17
5.6.150.0100.03318.16
5.6.140.0070.08018.11
5.6.130.0130.06718.11
5.6.120.0070.08021.11
5.6.110.0100.07020.95
5.6.100.0000.06021.00
5.6.90.0070.08320.99
5.6.80.0030.06720.39
5.5.350.0030.07020.38
5.5.340.0130.05018.00
5.5.330.0130.07720.23
5.5.320.0030.04320.24
5.5.310.0130.04320.34
5.5.300.0070.06317.92
5.5.290.0070.04718.02
5.5.280.0130.04720.97
5.5.270.0130.07020.89
5.5.260.0170.07720.75
5.5.250.0030.08720.61
5.5.240.0200.07720.35
5.4.450.0230.06019.52
5.4.440.0530.06019.46
5.4.430.0100.06719.48
5.4.420.0170.05019.31
5.4.410.0100.05319.19
5.4.400.0130.05019.16
5.4.390.0070.06318.44
5.4.380.0200.06718.67
5.4.370.0100.06318.62
5.4.360.0130.06718.58
5.4.350.0100.07318.58
5.4.340.0130.06318.50
5.4.320.0130.08018.68
5.4.310.0230.07318.43
5.4.300.0170.07018.64
5.4.290.0170.06018.53
5.4.280.0270.04718.66
5.4.270.0300.06018.69
5.4.260.0170.05318.62
5.4.250.0200.05318.79
5.4.240.0230.04718.57
5.4.230.0170.05018.64
5.4.220.0270.04318.67
5.4.210.0170.05318.67
5.4.200.0270.04716.54
5.4.190.0130.05718.46
5.4.180.0100.06018.49
5.4.170.0170.06018.59
5.4.160.0130.06318.43
5.4.150.0170.05718.68
5.4.140.0200.05316.20
5.4.130.0270.06316.23
5.4.120.0300.03716.40
5.4.110.0230.04716.06
5.4.100.0300.04016.39
5.4.90.0170.06016.29
5.4.80.0170.05316.14
5.4.70.0200.05316.27
5.4.60.0170.05316.23
5.4.50.0270.05016.23
5.4.40.0200.05316.04
5.4.30.0230.04316.20
5.4.20.0070.07316.12
5.4.10.0170.06016.31
5.4.00.0170.05015.59
5.3.290.0230.07014.67
5.3.280.0230.06314.59
5.3.270.0200.05014.58
5.3.260.0230.06014.52
5.3.250.0200.07014.63
5.3.240.0270.05714.56
5.3.230.0230.05714.69
5.3.220.0130.07714.51
5.3.210.0170.05714.56
5.3.200.0130.06314.50
5.3.190.0170.07014.44
5.3.180.0200.06014.64
5.3.170.0130.07314.66
5.3.160.0200.05314.66
5.3.150.0100.08014.56
5.3.140.0200.06714.67
5.3.130.0170.07314.52
5.3.120.0200.07014.64
5.3.110.0230.06714.56
5.3.100.0270.06014.13
5.3.90.0300.05313.93
5.3.80.0270.04314.01
5.3.70.0070.06313.95
5.3.60.0100.05714.00
5.3.50.0270.04313.86
5.3.40.0170.05013.82
5.3.30.0170.04713.82
5.3.20.0170.05013.77
5.3.10.0930.05713.62
5.3.00.0170.04713.55
5.2.170.0170.04011.20
5.2.160.0070.05011.27
5.2.150.0130.04311.15
5.2.140.0100.04711.13
5.2.130.0100.04011.12
5.2.120.0130.04011.08
5.2.110.0070.04711.12
5.2.100.0130.04011.08
5.2.90.0070.04711.12
5.2.80.0130.04311.10
5.2.70.0100.04311.10
5.2.60.0070.04710.96
5.2.50.0170.04010.95
5.2.40.0030.04710.97
5.2.30.0130.03711.00
5.2.20.0100.04311.02
5.2.10.0100.04310.96
5.2.00.0100.04010.66
5.1.60.0070.0379.98
5.1.50.0130.03310.02
5.1.40.0100.03010.06
5.1.30.0130.03310.31
5.1.20.0130.03310.36
5.1.10.0170.03310.07
5.1.00.0100.04010.04
5.0.50.0100.0308.55
5.0.40.0070.0278.40
5.0.30.0070.0438.31
5.0.20.0100.0278.27
5.0.10.0030.0308.18
5.0.00.0070.0438.35
4.4.90.0030.0235.97
4.4.80.0070.0205.88
4.4.70.0100.0175.89
4.4.60.0070.0205.83
4.4.50.0000.0305.82
4.4.40.0100.0305.87
4.4.30.0100.0175.86
4.4.20.0030.0235.96
4.4.10.0030.0235.92
4.4.00.0030.0335.84
4.3.110.0100.0205.80
4.3.100.0030.0235.83
4.3.90.0130.0135.79
4.3.80.0070.0305.79
4.3.70.0070.0235.88
4.3.60.0070.0205.82
4.3.50.0030.0235.77
4.3.40.0070.0305.79
4.3.30.0070.0174.68
4.3.20.0000.0234.62
4.3.10.0000.0234.58
4.3.00.0100.0179.24

preferences:
60 ms | 400 KiB | 5 Q