3v4l.org

run code in 300+ PHP versions simultaneously
<?php $regex = '#<tag foo="bar">([\w\s]+[^\s]+)\s?</tag>#'; echo preg_replace($regex, '\1', '<tag foo="bar">Jacopo Nuzzi</tag>'). " $\n"; echo preg_replace($regex, '\1', '<tag foo="bar">Jacopo Nuzzi </tag>'). " $\n"; echo preg_replace($regex, '\1', '<tag foo="bar">Jacopo </tag>'). " $\n"; echo preg_replace($regex, '\1', '<tag foo="bar">Jacopo</tag>'). " $\n";

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.0070.01418.36
8.3.50.0120.00721.09
8.3.40.0120.00318.88
8.3.30.0070.00720.39
8.3.20.0060.00320.11
8.3.10.0000.00722.00
8.3.00.0080.00022.44
8.2.180.0070.01416.50
8.2.170.0130.00722.96
8.2.160.0070.00722.23
8.2.150.0080.00024.18
8.2.140.0030.00524.66
8.2.130.0070.00026.16
8.2.120.0080.00020.88
8.2.110.0000.00922.36
8.2.100.0090.00317.78
8.2.90.0000.00719.23
8.2.80.0040.00419.39
8.2.70.0070.00417.63
8.2.60.0030.00517.93
8.2.50.0110.00018.07
8.2.40.0080.00418.34
8.2.30.0000.00719.57
8.2.20.0000.00717.91
8.2.10.0040.00417.88
8.2.00.0000.00817.66
8.1.280.0070.00725.92
8.1.270.0030.00523.99
8.1.260.0040.00426.35
8.1.250.0000.00828.09
8.1.240.0000.00923.80
8.1.230.0050.00518.95
8.1.220.0040.00417.74
8.1.210.0050.00318.77
8.1.200.0060.00317.23
8.1.190.0060.00317.41
8.1.180.0060.00318.10
8.1.170.0040.00418.58
8.1.160.0040.00418.84
8.1.150.0000.00818.77
8.1.140.0000.00817.60
8.1.130.0000.00717.77
8.1.120.0000.00817.61
8.1.110.0040.00417.48
8.1.100.0080.00017.59
8.1.90.0050.00317.55
8.1.80.0040.00317.62
8.1.70.0030.00317.48
8.1.60.0000.00817.59
8.1.50.0070.00017.63
8.1.40.0040.00417.74
8.1.30.0040.00417.78
8.1.20.0090.00017.68
8.1.10.0040.00417.63
8.1.00.0000.00817.55
8.0.300.0060.00318.77
8.0.290.0040.00417.18
8.0.280.0030.00318.38
8.0.270.0000.00717.29
8.0.260.0030.00317.02
8.0.250.0000.00717.13
8.0.240.0050.00317.08
8.0.230.0070.00017.10
8.0.220.0000.00716.95
8.0.210.0000.00717.01
8.0.200.0000.00717.09
8.0.190.0060.00317.00
8.0.180.0040.00417.03
8.0.170.0050.00317.08
8.0.160.0040.00417.06
8.0.150.0000.00716.95
8.0.140.0050.00217.02
8.0.130.0000.00613.51
8.0.120.0060.00317.03
8.0.110.0050.00317.03
8.0.100.0000.00716.93
8.0.90.0040.00416.94
8.0.80.0160.00616.92
8.0.70.0040.00416.92
8.0.60.0040.00416.96
8.0.50.0030.00517.03
8.0.30.0100.01217.33
8.0.20.0100.01017.40
8.0.10.0000.00817.04
8.0.00.0100.01016.70
7.4.330.0060.00016.71
7.4.320.0030.00316.80
7.4.300.0000.00716.79
7.4.290.0030.00316.72
7.4.280.0070.00016.55
7.4.270.0000.00916.67
7.4.260.0060.00013.32
7.4.250.0080.00016.62
7.4.240.0020.00516.63
7.4.230.0070.00016.65
7.4.220.0120.00616.63
7.4.210.0050.01016.69
7.4.200.0040.00416.57
7.4.190.0030.00316.76
7.4.160.0120.00416.68
7.4.150.0090.01217.40
7.4.140.0080.00817.86
7.4.130.0120.00616.80
7.4.120.0110.00916.57
7.4.110.0120.00816.64
7.4.100.0060.01316.73
7.4.90.0030.01616.78
7.4.80.0090.00919.39
7.4.70.0000.01716.57
7.4.60.0090.00916.65
7.4.50.0000.00516.55
7.4.40.0090.00922.77
7.4.30.0120.00916.83
7.4.00.0050.01114.86
7.3.330.0030.00313.09
7.3.320.0030.00413.33
7.3.310.0000.00716.35
7.3.300.0030.00316.30
7.3.290.0100.00316.30
7.3.280.0090.00716.36
7.3.270.0090.00917.40
7.3.260.0120.00516.29
7.3.250.0100.01016.33
7.3.240.0070.01416.75
7.3.230.0030.01616.46
7.3.210.0100.00616.39
7.3.200.0060.01519.39
7.3.190.0030.01316.69
7.3.180.0090.00916.39
7.3.170.0080.00716.56
7.3.160.0060.00916.58
7.3.120.0100.00714.91
7.3.110.0110.00715.25
7.3.100.0090.00615.16
7.3.90.0070.00714.84
7.3.80.0030.01214.89
7.3.70.0060.00915.01
7.3.60.0040.01114.99
7.3.50.0090.00615.00
7.3.40.0140.00314.91
7.3.30.0090.00314.97
7.3.20.0030.00716.79
7.3.10.0090.00616.84
7.3.00.0110.00016.76
7.2.330.0110.00716.53
7.2.320.0120.00616.88
7.2.310.0100.00716.49
7.2.300.0070.01116.52
7.2.290.0110.00616.56
7.2.250.0070.00715.09
7.2.240.0070.01415.23
7.2.230.0080.00415.37
7.2.220.0040.00815.14
7.2.210.0100.00715.29
7.2.200.0060.00615.34
7.2.190.0070.01014.84
7.2.180.0100.00314.89
7.2.170.0030.01215.04
7.2.60.0070.00316.78
7.2.00.0000.01419.70
7.1.330.0060.01015.98
7.1.320.0070.00715.92
7.1.310.0070.01016.07
7.1.300.0070.01015.85
7.1.290.0100.00315.68
7.1.280.0120.00315.84
7.1.270.0090.00615.88
7.1.260.0000.01016.08
7.1.200.0030.00715.79
7.1.100.0100.00718.57
7.1.70.0000.00716.94
7.1.60.0090.01219.21
7.1.50.0260.01034.88
7.1.00.0030.03322.47
7.0.200.0000.01016.89
7.0.140.0030.07322.18
7.0.110.0100.06319.87
7.0.100.0570.07320.12
7.0.90.0430.08320.05
7.0.80.0570.07719.89
7.0.70.0670.07320.04
7.0.60.0500.06020.11
7.0.50.0630.07320.49
7.0.40.0100.08320.22
7.0.30.0170.07020.06
7.0.20.0100.07720.02
7.0.10.0030.08720.16
7.0.00.0030.08320.02
5.6.260.0200.07720.72
5.6.250.0000.05320.62
5.6.240.0030.07320.48
5.6.230.0130.07320.54
5.6.220.0130.07020.69
5.6.210.0030.09020.67
5.6.200.0070.08021.11
5.6.190.0070.07320.93
5.6.180.0130.07721.05
5.6.170.0170.07720.93
5.6.160.0070.08321.05
5.6.150.0170.07721.21
5.6.140.0070.08020.94
5.6.130.0070.05321.21
5.6.120.0030.06721.07
5.6.110.0200.07321.06
5.6.100.0130.07321.01
5.6.90.0030.09020.93
5.6.80.0070.07720.43
5.6.70.0070.06720.36
5.6.60.0170.07020.29
5.6.50.0200.06320.40
5.6.40.0100.08020.43
5.6.30.0170.07020.55
5.6.20.0130.07020.31
5.6.10.0030.09020.57
5.6.00.0170.06020.32
5.5.380.0000.05020.54
5.5.370.0030.07320.57
5.5.360.0100.04720.50
5.5.350.0000.08320.36
5.5.340.0070.07321.02
5.5.330.0130.07320.97
5.5.320.0070.07720.89
5.5.310.0100.08020.89
5.5.300.0200.07320.73
5.5.290.0070.08020.70
5.5.280.0100.08020.80
5.5.270.0070.08021.00
5.5.260.0030.08720.83
5.5.250.0170.07020.84
5.5.240.0070.07720.16
5.5.230.0070.08320.32
5.5.220.0170.06320.32
5.5.210.0200.06320.07
5.5.200.0100.07020.27
5.5.190.0070.07020.16
5.5.180.0200.06720.32
5.5.160.0100.06020.09
5.5.150.0070.06320.32
5.5.140.0100.03720.36
5.5.130.0130.06020.12
5.5.120.0100.08020.30
5.5.110.0070.08020.12
5.5.100.0100.07020.27
5.5.90.0100.07020.22
5.5.80.0070.04720.27
5.5.70.0030.06720.04
5.5.60.0030.04720.06
5.5.50.0100.07320.00
5.5.40.0130.08719.93
5.5.30.0070.08319.96
5.5.20.0100.07020.20
5.5.10.0070.07019.96
5.5.00.0070.08020.06
5.4.450.0130.04019.45
5.4.440.0030.05319.33
5.4.430.0030.08019.35
5.4.420.0170.06719.48
5.4.410.0170.06019.31
5.4.400.0100.07319.04
5.4.390.0100.06719.07
5.4.380.0070.07719.00
5.4.370.0130.07719.25
5.4.360.0100.06719.00
5.4.350.0130.06718.95
5.4.340.0170.06718.98
5.4.320.0070.05319.12
5.4.310.0000.05018.94
5.4.300.0030.07319.17
5.4.290.0070.07319.00
5.4.280.0030.08019.01
5.4.270.0100.06318.92
5.4.260.0130.07319.10
5.4.250.0070.08319.00
5.4.240.0100.07019.18
5.4.230.0070.03719.00
5.4.220.0030.07719.09
5.4.210.0130.07019.02
5.4.200.0100.06718.92
5.4.190.0100.07719.02
5.4.180.0100.07719.23
5.4.170.0000.08319.26
5.4.160.0070.07018.99
5.4.150.0070.04718.91
5.4.140.0130.06716.50
5.4.130.0100.04016.18
5.4.120.0030.07716.25
5.4.110.0100.04716.13
5.4.100.0070.07316.41
5.4.90.0130.04016.29
5.4.80.0070.07016.38
5.4.70.0130.06716.27
5.4.60.0100.06316.32
5.4.50.0030.04316.34
5.4.40.0170.06316.51
5.4.30.0000.08016.34
5.4.20.0170.06316.48
5.4.10.0070.07016.21
5.4.00.0130.06315.96
5.3.290.0100.04314.57
5.3.280.0200.06314.61
5.3.270.0100.06014.48
5.3.260.0000.08314.39
5.3.250.0100.04014.39
5.3.240.0170.06314.47
5.3.230.0100.06714.60
5.3.220.0070.07014.66
5.3.210.0130.07014.45
5.3.200.0070.07714.49
5.3.190.0070.07314.49
5.3.180.0100.07014.58
5.3.170.0000.07014.57
5.3.160.0030.07714.41
5.3.150.0030.08014.44
5.3.140.0000.05014.43
5.3.130.0100.04014.37
5.3.120.0070.04314.55
5.3.110.0070.07014.61
5.3.100.0130.06713.93
5.3.90.0100.07014.03
5.3.80.0070.07713.96
5.3.70.0130.06714.07
5.3.60.0030.08013.94
5.3.50.0030.05013.83
5.3.40.0030.07713.89
5.3.30.0030.07713.84
5.3.20.0030.07313.75
5.3.10.0130.03013.59
5.3.00.0070.04013.65
5.2.170.0070.06012.04
5.2.160.0000.06712.04
5.2.150.0000.07012.04
5.2.140.0030.06712.04
5.2.130.0130.05012.04
5.2.120.0100.05712.04
5.2.110.0100.05712.04
5.2.100.0070.05712.04
5.2.90.0030.06312.04
5.2.80.0100.05712.04
5.2.70.0030.06312.04
5.2.60.0170.05012.04
5.2.50.0130.05712.04
5.2.40.0070.06012.04
5.2.30.0100.06012.04
5.2.20.0070.05712.04
5.2.10.0030.03712.04
5.2.00.0000.06312.04
5.1.60.0030.04312.04
5.1.50.0070.04312.04
5.1.40.0030.04012.04
5.1.30.0030.06012.04
5.1.20.0100.04312.04
5.1.10.0100.04712.04
5.1.00.0000.03712.04
5.0.50.0030.04712.04
5.0.40.0070.03312.04
5.0.30.0070.06312.04
5.0.20.0070.03712.04
5.0.10.0070.04012.04
5.0.00.0000.06712.04
4.4.90.0000.03712.04
4.4.80.0000.03712.04
4.4.70.0070.03012.04
4.4.60.0070.03312.04
4.4.50.0030.03012.04
4.4.40.0030.05312.04
4.4.30.0100.02312.04
4.4.20.0000.03712.04
4.4.10.0030.03712.04
4.4.00.0070.05312.04
4.3.110.0070.03012.04
4.3.100.0070.03012.04
4.3.90.0000.04312.04
4.3.80.0070.04712.04
4.3.70.0000.03712.04
4.3.60.0030.03312.04
4.3.50.0000.03312.04
4.3.40.0030.05012.04
4.3.30.0030.03312.04
4.3.20.0030.03712.04
4.3.10.0030.02712.04
4.3.00.0000.03712.04

preferences:
43.25 ms | 401 KiB | 5 Q