3v4l.org

run code in 300+ PHP versions simultaneously
<?php $regex = '#<tag foo="bar">([\w\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.0040.01116.63
8.3.50.0080.01117.56
8.3.40.0060.00918.96
8.3.30.0100.00718.84
8.3.20.0080.00018.87
8.3.10.0000.00818.73
8.3.00.0050.00319.38
8.2.180.0110.01116.88
8.2.170.0070.01322.96
8.2.160.0040.01121.32
8.2.150.0040.00424.18
8.2.140.0000.00824.66
8.2.130.0040.00426.16
8.2.120.0070.00021.07
8.2.110.0130.00021.16
8.2.100.0070.00417.91
8.2.90.0060.00319.41
8.2.80.0040.00419.33
8.2.70.0000.00817.75
8.2.60.0030.00617.93
8.2.50.0000.00818.07
8.2.40.0080.00018.22
8.2.30.0000.00818.05
8.2.20.0000.00917.79
8.2.10.0040.00417.75
8.2.00.0040.00417.82
8.1.280.0120.00625.92
8.1.270.0040.00424.66
8.1.260.0060.00326.35
8.1.250.0040.00428.09
8.1.240.0100.00022.61
8.1.230.0080.00420.95
8.1.220.0050.00317.74
8.1.210.0030.00719.04
8.1.200.0060.00317.35
8.1.190.0000.00817.53
8.1.180.0040.00418.10
8.1.170.0040.00818.89
8.1.160.0040.00418.96
8.1.150.0040.00418.78
8.1.140.0020.00517.53
8.1.130.0030.00317.85
8.1.120.0040.00417.68
8.1.110.0050.00217.51
8.1.100.0050.00317.60
8.1.90.0040.00417.59
8.1.80.0040.00417.49
8.1.70.0070.00017.48
8.1.60.0020.00517.72
8.1.50.0040.00417.48
8.1.40.0000.00817.65
8.1.30.0000.00817.75
8.1.20.0000.00817.75
8.1.10.0070.00017.61
8.1.00.0030.00617.62
8.0.300.0070.00020.04
8.0.290.0050.00216.75
8.0.280.0070.00018.31
8.0.270.0050.00317.16
8.0.260.0030.00316.90
8.0.250.0050.00317.04
8.0.240.0050.00317.11
8.0.230.0030.00316.98
8.0.220.0040.00417.05
8.0.210.0000.00617.02
8.0.200.0020.00517.13
8.0.190.0050.00217.03
8.0.180.0040.00417.11
8.0.170.0000.00917.02
8.0.160.0000.00717.03
8.0.150.0030.00616.88
8.0.140.0030.00617.08
8.0.130.0000.00613.44
8.0.120.0040.00417.01
8.0.110.0000.00716.97
8.0.100.0040.00417.02
8.0.90.0030.00517.06
8.0.80.0060.00917.08
8.0.70.0000.00716.87
8.0.60.0000.00716.85
8.0.50.0080.00017.00
8.0.30.0110.00717.41
8.0.20.0110.00716.97
8.0.10.0000.00717.09
8.0.00.0110.00716.99
7.4.330.0000.00513.11
7.4.320.0030.00316.80
7.4.300.0000.00716.66
7.4.290.0050.00316.79
7.4.280.0040.00416.73
7.4.270.0000.00816.56
7.4.260.0000.00613.48
7.4.250.0040.00416.53
7.4.240.0030.00416.67
7.4.230.0030.00316.66
7.4.220.0140.00616.74
7.4.210.0070.01016.75
7.4.200.0000.00816.63
7.4.190.0030.00316.51
7.4.160.0130.00916.79
7.4.150.0130.00416.45
7.4.140.0110.00716.77
7.4.130.0110.00916.64
7.4.120.0140.00316.54
7.4.110.0160.00616.63
7.4.100.0090.00916.58
7.4.90.0080.01416.45
7.4.80.0090.00619.39
7.4.70.0100.00616.59
7.4.60.0090.00616.52
7.4.50.0080.00016.70
7.4.40.0060.00816.63
7.4.30.0090.01216.66
7.4.00.0030.01414.91
7.3.330.0030.00313.09
7.3.320.0000.00513.11
7.3.310.0000.00716.48
7.3.300.0000.00716.34
7.3.290.0060.00916.45
7.3.280.0110.00816.37
7.3.270.0100.00716.39
7.3.260.0140.00316.69
7.3.250.0110.00616.32
7.3.240.0090.00916.59
7.3.230.0090.00916.41
7.3.210.0070.01016.61
7.3.200.0140.00316.40
7.3.190.0070.01016.40
7.3.180.0130.00716.76
7.3.170.0120.00416.54
7.3.160.0040.01916.57
7.3.120.0090.00315.14
7.3.10.0090.00916.85
7.3.00.0100.00416.82
7.2.330.0060.01216.80
7.2.320.0130.01016.72
7.2.310.0000.01816.67
7.2.300.0040.01216.88
7.2.290.0070.01016.75
7.2.130.0160.00416.84
7.2.120.0090.00916.84
7.2.110.0070.01016.96
7.2.100.0070.00716.73
7.2.90.0030.01217.01
7.2.80.0060.00916.75
7.2.70.0070.00317.00
7.2.60.0080.00616.83
7.2.50.0030.01017.05
7.2.40.0090.00917.11
7.2.30.0030.01216.68
7.2.20.0060.01316.95
7.2.10.0060.00916.97
7.2.00.0090.00418.20
7.1.250.0090.00915.79
7.1.100.0110.00718.20
7.1.70.0030.01017.41
7.1.60.0140.01119.40
7.1.50.0070.01517.06
7.1.00.0000.08322.30
7.0.200.0160.00015.06
7.0.140.0070.07021.95
7.0.120.0000.05322.02
7.0.60.0030.07019.81
7.0.50.0070.03717.88
7.0.40.0030.04320.06
7.0.30.0300.06720.13
7.0.20.0300.08020.10
7.0.10.0230.07320.10
7.0.00.0030.04320.03
5.6.210.0170.05720.64
5.6.200.0030.04318.22
5.6.190.0070.09020.77
5.6.180.0330.07320.59
5.6.170.0200.04320.46
5.6.160.0170.06320.54
5.6.150.0070.09018.09
5.6.140.0000.05718.07
5.6.130.0070.04018.21
5.6.120.0070.08321.03
5.6.110.0070.08721.13
5.6.100.0100.07721.05
5.6.90.0000.08321.09
5.6.80.0100.08020.41
5.6.70.0230.03020.38
5.5.350.0270.06720.49
5.5.340.0000.05317.98
5.5.330.0030.04320.40
5.5.320.0000.05320.13
5.5.310.0230.08020.28
5.5.300.0070.05717.98
5.5.290.0030.08718.00
5.5.280.0270.06720.75
5.5.270.0000.09320.79
5.5.260.0070.09320.86
5.5.250.0170.07320.46
5.5.240.0070.08320.03
5.4.450.0100.05719.43
5.4.440.0100.08319.52
5.4.430.0070.04319.24
5.4.420.0000.06719.11
5.4.410.0100.07719.37
5.4.400.0070.07019.10
5.4.390.0100.07719.14
5.4.380.0070.03718.80
5.4.370.0130.07019.16
5.4.360.0070.07719.14
5.4.350.0100.05719.17
5.4.340.0030.08018.80
5.4.320.0100.07719.00
5.4.310.0170.06019.09
5.4.300.0130.07019.17
5.4.290.0070.05019.17
5.4.280.0130.06319.08
5.4.270.0030.04718.92
5.4.260.0130.08018.91
5.4.250.0130.06318.80
5.4.240.0100.04719.17
5.4.230.0030.04019.07
5.4.220.0130.04018.80
5.4.210.0070.03719.16
5.4.200.0100.07018.99
5.4.190.0100.08019.09
5.4.180.0000.04719.07
5.4.170.0030.08319.08
5.4.160.0070.04319.15
5.4.150.0030.04019.06
5.4.140.0030.07016.29
5.4.130.0100.07316.24
5.4.120.0070.06316.48
5.4.110.0000.04016.25
5.4.100.0100.03016.27
5.4.90.0030.04016.26
5.4.80.0000.03716.29
5.4.70.0030.03316.33
5.4.60.0070.03016.24
5.4.50.0000.04016.18
5.4.40.0000.03716.41
5.4.30.0030.03316.27
5.4.20.0000.03716.24
5.4.10.0030.03716.25
5.4.00.0030.03315.65
5.3.290.0100.06314.59
5.3.280.0130.05714.53
5.3.270.0070.07714.53
5.3.260.0130.07014.50
5.3.250.0100.05014.55
5.3.240.0100.04314.58
5.3.230.0070.07014.56
5.3.220.0030.03714.49
5.3.210.0070.03714.48
5.3.200.0030.04014.46
5.3.190.0030.04014.51
5.3.180.0000.04014.44
5.3.170.0170.02314.47
5.3.160.0130.02714.52
5.3.150.0000.04014.51
5.3.140.0070.03314.50
5.3.130.0070.04714.34
5.3.120.0000.05714.51
5.3.110.0000.04014.34
5.3.100.0000.04014.12
5.3.90.0070.03313.95
5.3.80.0100.03713.95
5.3.70.0000.04013.94
5.3.60.0070.03714.09
5.3.50.0000.04313.76
5.3.40.0100.02713.90
5.3.30.0030.03713.92
5.3.20.0000.03713.63
5.3.10.0030.03313.62
5.3.00.0000.03713.57
5.2.170.0000.03011.04
5.2.160.0030.02711.15
5.2.150.0100.03011.08
5.2.140.0030.02711.07
5.2.130.0000.03311.04
5.2.120.0030.03011.00
5.2.110.0000.03011.10
5.2.100.0030.02711.00
5.2.90.0070.02311.18
5.2.80.0030.02710.99
5.2.70.0030.02710.98
5.2.60.0000.03011.03
5.2.50.0030.02710.99
5.2.40.0000.03010.83
5.2.30.0000.03010.86
5.2.20.0030.02710.86
5.2.10.0070.02310.83
5.2.00.0000.06310.87
5.1.60.0000.0309.94
5.1.50.0100.05310.03
5.1.40.0070.03310.12
5.1.30.0070.05710.38
5.1.20.0100.02710.34
5.1.10.0000.04310.14
5.1.00.0070.02710.04
5.0.50.0000.0338.52
5.0.40.0070.0438.37
5.0.30.0000.0308.28
5.0.20.0030.0278.23
5.0.10.0030.0338.24
5.0.00.0000.0508.29
4.4.90.0000.0137.99
4.4.80.0000.0177.99
4.4.70.0030.0137.99
4.4.60.0030.0137.99
4.4.50.0000.0177.99
4.4.40.0000.0537.99
4.4.30.0000.0377.99
4.4.20.0070.0307.99
4.4.10.0070.0307.99
4.4.00.0030.0277.99
4.3.110.0030.0307.99
4.3.100.0000.0277.99
4.3.90.0030.0337.99
4.3.80.0000.0337.99
4.3.70.0030.0377.99
4.3.60.0070.0277.99
4.3.50.0030.0277.99
4.3.40.0070.0537.99
4.3.30.0000.0337.99
4.3.20.0030.0237.99
4.3.10.0000.0407.99
4.3.00.0000.0277.99

preferences:
39.71 ms | 401 KiB | 5 Q