3v4l.org

run code in 300+ PHP versions simultaneously
<?php $your_variable = '[section title="This is the title"]'; $your_variable = str_replace('type="full" type="wrapper"]','type="full"]',preg_replace ( '/\[section([^\]]+)(?!type)\]/i' , '[section$1 type="wrapper"]' , $your_variable )); echo "First try: ".$your_variable."\n"; $your_variable = '[section title="This is the title" type="full"]'; $your_variable = str_replace('type="full" type="wrapper"]','type="full"]',preg_replace ( '/\[section([^\]]+)(?!type)\]/i' , '[section$1 type="wrapper"]' , $your_variable )); echo "First try: ".$your_variable."\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.0120.00618.43
8.3.50.0130.00521.21
8.3.40.0110.00419.01
8.3.30.0140.00020.34
8.3.20.0020.00520.21
8.3.10.0000.00822.13
8.3.00.0040.00422.40
8.2.180.0150.00016.63
8.2.170.0140.00422.96
8.2.160.0190.00022.27
8.2.150.0080.00024.18
8.2.140.0090.00024.66
8.2.130.0000.00826.16
8.2.120.0000.00820.94
8.2.110.0060.00320.35
8.2.100.0080.00318.22
8.2.90.0050.00319.23
8.2.80.0000.00819.38
8.2.70.0040.00417.75
8.2.60.0090.00017.80
8.2.50.0040.00418.07
8.2.40.0060.00318.18
8.2.30.0030.00519.35
8.2.20.0040.00417.74
8.2.10.0000.00717.98
8.2.00.0040.00417.91
8.1.280.0090.00925.92
8.1.270.0080.00023.99
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0030.00619.26
8.1.230.0070.00420.89
8.1.220.0100.00019.38
8.1.210.0000.00918.77
8.1.200.0030.00617.35
8.1.190.0040.00417.40
8.1.180.0050.00318.10
8.1.170.0080.00018.62
8.1.160.0020.00518.93
8.1.150.0000.00818.71
8.1.140.0050.00317.66
8.1.130.0000.00717.80
8.1.120.0040.00417.66
8.1.110.0070.00017.64
8.1.100.0040.00417.63
8.1.90.0040.00417.66
8.1.80.0000.00817.62
8.1.70.0000.00717.65
8.1.60.0040.00417.64
8.1.50.0030.00517.66
8.1.40.0000.00817.66
8.1.30.0030.00617.68
8.1.20.0040.00417.75
8.1.10.0070.00017.71
8.1.00.0040.00417.60
8.0.300.0000.00718.77
8.0.290.0070.00017.18
8.0.280.0040.00418.50
8.0.270.0030.00317.17
8.0.260.0060.00316.98
8.0.250.0090.00017.13
8.0.240.0030.00517.03
8.0.230.0000.00717.01
8.0.220.0070.00016.95
8.0.210.0030.00317.11
8.0.200.0000.00717.13
8.0.190.0040.00417.10
8.0.180.0000.00717.08
8.0.170.0000.00817.09
8.0.160.0040.00417.07
8.0.150.0000.00816.88
8.0.140.0030.00616.92
8.0.130.0050.00213.43
8.0.120.0070.00016.86
8.0.110.0040.00417.00
8.0.100.0050.00217.03
8.0.90.0030.00517.09
8.0.80.0090.00916.98
8.0.70.0040.00416.96
8.0.60.0040.00417.00
8.0.50.0000.00716.98
8.0.30.0120.01117.26
8.0.20.0120.01317.40
8.0.10.0040.00416.97
8.0.00.0090.00916.96
7.4.330.0040.00015.06
7.4.320.0000.00616.77
7.4.300.0080.00016.56
7.4.290.0030.00316.55
7.4.280.0040.00416.67
7.4.270.0060.00316.56
7.4.260.0030.00313.43
7.4.250.0030.00516.52
7.4.240.0030.00416.69
7.4.230.0000.00716.74
7.4.220.0060.02016.80
7.4.210.0050.00916.73
7.4.200.0020.00516.59
7.4.190.0000.00716.70
7.4.160.0090.00616.57
7.4.150.0100.00717.40
7.4.140.0030.01317.86
7.4.130.0090.00916.72
7.4.120.0140.00816.63
7.4.110.0060.01216.58
7.4.100.0030.01416.64
7.4.90.0180.00016.69
7.4.80.0130.01019.39
7.4.70.0090.00816.43
7.4.60.0180.00316.80
7.4.50.0040.00416.46
7.4.40.0040.01122.77
7.4.30.0070.01016.63
7.4.00.0030.01215.13
7.3.330.0000.00513.27
7.3.320.0030.00313.33
7.3.310.0040.00416.37
7.3.300.0070.00016.42
7.3.290.0090.00616.54
7.3.280.0060.01116.48
7.3.270.0170.00317.40
7.3.260.0040.01616.69
7.3.250.0100.01116.58
7.3.240.0070.01016.83
7.3.230.0090.01016.69
7.3.210.0070.01016.71
7.3.200.0110.00219.39
7.3.190.0070.01016.68
7.3.180.0130.00316.47
7.3.170.0080.00816.76
7.3.160.0080.00816.64
7.3.120.0070.01114.61
7.2.330.0030.01416.84
7.2.320.0140.00417.00
7.2.310.0090.00916.76
7.2.300.0120.00916.84
7.2.290.0080.00817.08
7.2.00.0070.00719.66
7.1.100.0090.00918.16
7.1.70.0000.00717.37
7.1.60.0100.00719.21
7.1.50.0060.01916.81
7.1.00.0030.04022.42
7.0.200.0030.00616.82
7.0.140.0100.06322.21
7.0.70.0030.08719.96
7.0.60.0170.05319.96
7.0.50.0130.05320.29
7.0.40.0000.08720.00
7.0.30.0030.08720.15
7.0.20.0070.09720.05
7.0.10.0000.06720.08
7.0.00.0000.04720.02
5.6.280.0030.07320.77
5.6.220.0030.09020.61
5.6.210.0070.06020.75
5.6.200.0130.08021.05
5.6.190.0070.06321.09
5.6.180.0030.08721.14
5.6.170.0230.06321.06
5.6.160.0030.07321.00
5.6.150.0000.09321.08
5.6.140.0030.05721.11
5.6.130.0170.07721.02
5.6.120.0070.05021.05
5.6.110.0170.08020.93
5.6.100.0070.06321.12
5.6.90.0200.06720.93
5.6.80.0070.04020.46
5.6.70.0070.06720.46
5.6.60.0070.08020.37
5.6.50.0100.05020.44
5.6.40.0100.06720.52
5.6.30.0100.07320.47
5.6.20.0130.06720.39
5.6.10.0130.07320.39
5.6.00.0070.07720.39
5.5.360.0070.08320.34
5.5.350.0100.08320.39
5.5.340.0170.07320.92
5.5.330.0000.08320.87
5.5.320.0070.04320.88
5.5.310.0000.08720.91
5.5.300.0070.06320.86
5.5.290.0030.06320.88
5.5.280.0100.08720.73
5.5.270.0070.04020.89
5.5.260.0170.07720.86
5.5.250.0200.07720.64
5.5.240.0030.08020.11
5.5.230.0070.08320.20
5.5.220.0070.07720.29
5.5.210.0100.06720.16
5.5.200.0000.05320.14
5.5.190.0200.07020.20
5.5.180.0170.05320.21
5.5.160.0070.07020.12
5.5.150.0100.07320.17
5.5.140.0070.06320.26
5.5.130.0070.08020.15
5.5.120.0100.07719.99
5.5.110.0130.04720.22
5.5.100.0070.08720.14
5.5.90.0030.07020.11
5.5.80.0070.07720.04
5.5.70.0030.08020.00
5.5.60.0030.07320.05
5.5.50.0100.08020.12
5.5.40.0000.09020.03
5.5.30.0100.04319.99
5.5.20.0070.05019.99
5.5.10.0070.06020.04
5.5.00.0100.08020.02
5.4.450.0070.05319.43
5.4.440.0130.04719.45
5.4.430.0030.06019.39
5.4.420.0030.08319.36
5.4.410.0100.04019.29
5.4.400.0070.06719.10
5.4.390.0030.06318.96
5.4.380.0000.07718.94
5.4.370.0030.05718.95
5.4.360.0100.07018.95
5.4.350.0100.07719.13
5.4.340.0100.07719.14
5.4.320.0100.07719.02
5.4.310.0130.07018.96
5.4.300.0170.06318.94
5.4.290.0070.07719.04
5.4.280.0130.07019.03
5.4.270.0030.08019.23
5.4.260.0000.08319.09
5.4.250.0070.05319.02
5.4.240.0000.05719.02
5.4.230.0000.06019.11
5.4.220.0030.05019.11
5.4.210.0100.08018.77
5.4.200.0030.04718.89
5.4.190.0070.07019.23
5.4.180.0170.07319.11
5.4.170.0100.07719.02
5.4.160.0070.06019.21
5.4.150.0130.04718.80
5.4.140.0070.07316.28
5.4.130.0070.07016.34
5.4.120.0070.07316.28
5.4.110.0030.07716.26
5.4.100.0030.06316.30
5.4.90.0000.06316.26
5.4.80.0100.05716.41
5.4.70.0170.06016.21
5.4.60.0070.04316.38
5.4.50.0070.06316.28
5.4.40.0030.07716.34
5.4.30.0130.06716.38
5.4.20.0030.04016.19
5.4.10.0100.07016.41
5.4.00.0100.04015.69
5.3.290.0070.07014.65
5.3.280.0100.07314.60
5.3.270.0030.07314.59
5.3.260.0030.08014.46
5.3.250.0170.07014.61
5.3.240.0030.07714.61
5.3.230.0070.06014.46
5.3.220.0130.07014.57
5.3.210.0100.08014.56
5.3.200.0030.06714.42
5.3.190.0100.06314.55
5.3.180.0030.05714.50
5.3.170.0030.08314.56
5.3.160.0070.07314.42
5.3.150.0030.08314.39
5.3.140.0100.07014.53
5.3.130.0070.07714.41
5.3.120.0070.06014.55
5.3.110.0030.05314.52
5.3.100.0170.05714.00
5.3.90.0100.06713.84
5.3.80.0000.07713.77
5.3.70.0100.08013.92
5.3.60.0000.04013.99
5.3.50.0070.04013.93
5.3.40.0100.06013.70
5.3.30.0030.05013.90
5.3.20.0030.07713.65
5.3.10.0000.04713.51
5.3.00.0030.04013.61
5.2.170.0000.03312.24
5.2.160.0070.02712.24
5.2.150.0070.03012.24
5.2.140.0030.06012.24
5.2.130.0000.05012.24
5.2.120.0000.04312.24
5.2.110.0000.03012.24
5.2.100.0030.02712.24
5.2.90.0000.03012.24
5.2.80.0000.03012.24
5.2.70.0030.03012.24
5.2.60.0070.02712.24
5.2.50.0030.03012.24
5.2.40.0030.02712.24
5.2.30.0070.03012.24
5.2.20.0030.02712.24
5.2.10.0000.03012.24
5.2.00.0000.03012.24
5.1.60.0000.02712.24
5.1.50.0030.02312.24
5.1.40.0070.02012.24
5.1.30.0030.05712.24
5.1.20.0030.03312.24
5.1.10.0000.03712.24
5.1.00.0000.03012.24
5.0.50.0000.02012.24
5.0.40.0030.01712.24
5.0.30.0030.03012.24
5.0.20.0070.01312.24
5.0.10.0000.02312.24
5.0.00.0000.03012.24
4.4.90.0000.01712.24
4.4.80.0030.01312.24
4.4.70.0000.02312.24
4.4.60.0030.01312.24
4.4.50.0000.01712.24
4.4.40.0070.01712.24
4.4.30.0030.01312.24
4.4.20.0030.01312.24
4.4.10.0070.01012.24
4.4.00.0030.02012.24
4.3.110.0000.01712.24
4.3.100.0000.01312.24
4.3.90.0000.02712.24
4.3.80.0000.02012.24
4.3.70.0000.01312.24
4.3.60.0000.01312.24
4.3.50.0030.01012.24
4.3.40.0030.02012.24
4.3.30.0000.03012.24
4.3.20.0030.03012.24
4.3.10.0000.02312.24
4.3.00.0000.01712.24

preferences:
46.46 ms | 400 KiB | 5 Q