3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = "Hello {replace this curley} {{but not this one}} {{{and not this one}}}"; $formatted = preg_replace('/^(?!\{{2,})(?:[^\{]*)(\{{1})(?:[^\{\}]*)(\}{1})$/',"",$string); var_dump($formatted);

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.40.0040.01118.92
8.3.30.0000.01518.58
8.3.20.0000.00820.21
8.3.10.0040.00421.69
8.3.00.0000.00819.25
8.2.170.0180.00022.96
8.2.160.0110.00319.05
8.2.150.0050.00324.18
8.2.140.0080.00024.66
8.2.130.0050.00322.21
8.2.120.0000.00826.35
8.2.110.0070.00421.23
8.2.100.0110.00017.91
8.2.90.0030.00617.68
8.2.80.0000.00817.97
8.2.70.0050.00317.74
8.2.60.0000.00917.55
8.2.50.0080.00018.10
8.2.40.0040.00422.45
8.2.30.0050.00319.09
8.2.20.0000.00717.77
8.2.10.0000.00717.96
8.2.00.0050.00218.08
8.1.270.0090.00023.83
8.1.260.0040.00428.09
8.1.250.0080.00028.09
8.1.240.0030.00723.89
8.1.230.0080.00322.70
8.1.220.0000.00817.74
8.1.210.0080.00018.77
8.1.200.0030.00817.35
8.1.190.0060.00317.23
8.1.180.0030.00518.10
8.1.170.0000.00818.63
8.1.160.0040.00422.04
8.1.150.0040.00418.95
8.1.140.0070.00019.53
8.1.130.0030.00317.57
8.1.120.0040.00417.58
8.1.110.0050.00217.49
8.1.100.0000.00717.57
8.1.90.0060.00317.43
8.1.80.0000.00717.55
8.1.70.0000.00717.44
8.1.60.0050.00317.62
8.1.50.0030.00517.61
8.1.40.0000.00817.49
8.1.30.0040.00417.63
8.1.20.0060.00317.64
8.1.10.0000.00817.62
8.1.00.0040.00417.44
8.0.300.0070.00019.86
8.0.290.0040.00416.75
8.0.280.0030.00318.39
8.0.270.0060.00317.11
8.0.260.0040.00417.27
8.0.250.0030.00317.05
8.0.240.0040.00417.07
8.0.230.0000.00717.04
8.0.220.0050.00216.94
8.0.210.0040.00416.97
8.0.200.0030.00317.02
8.0.190.0000.00717.02
8.0.180.0000.00716.98
8.0.170.0040.00416.96
8.0.160.0040.00416.98
8.0.150.0040.00416.98
8.0.140.0030.00316.80
8.0.130.0000.00513.44
8.0.120.0040.00416.93
8.0.110.0030.00616.98
8.0.100.0030.00416.96
8.0.90.0030.00516.78
8.0.80.0030.01216.88
8.0.70.0050.00316.86
8.0.60.0000.00816.79
8.0.50.0030.00516.96
8.0.30.0150.00517.20
8.0.20.0140.00717.40
8.0.10.0040.00416.98
8.0.00.0100.01016.70
7.4.330.0020.00215.08
7.4.320.0030.00316.66
7.4.300.0000.00616.79
7.4.290.0030.00316.69
7.4.280.0070.00016.62
7.4.270.0030.00316.58
7.4.260.0030.00716.67
7.4.250.0030.00316.54
7.4.240.0040.00416.71
7.4.230.0070.00016.51
7.4.220.0110.00716.67
7.4.210.0100.00516.65
7.4.200.0030.00316.75
7.4.160.0140.00316.70
7.4.150.0110.00717.40
7.4.140.0150.00317.86
7.4.130.0120.00716.57
7.4.120.0110.00616.54
7.4.110.0030.01316.69
7.4.100.0100.00716.65
7.4.90.0100.00716.59
7.4.80.0030.01519.39
7.4.70.0150.00616.47
7.4.60.0030.01216.61
7.4.50.0040.00816.44
7.4.40.0110.00616.70
7.4.30.0100.00616.46
7.4.00.0100.00514.74
7.3.330.0030.00313.23
7.3.320.0000.00513.16
7.3.310.0030.00316.39
7.3.300.0040.00416.20
7.3.290.0030.00316.34
7.3.280.0080.00816.27
7.3.270.0130.00417.40
7.3.260.0140.00716.40
7.3.250.0070.01116.42
7.3.240.0120.01016.35
7.3.230.0070.01016.39
7.3.210.0040.01316.25
7.3.200.0100.00716.39
7.3.190.0090.00616.33
7.3.180.0070.01416.54
7.3.170.0070.01016.34
7.3.160.0210.00016.53
7.3.120.0140.00314.83
7.3.110.0030.01415.05
7.3.100.0030.01314.54
7.3.90.0000.01315.01
7.3.80.0060.01014.77
7.3.70.0070.01014.92
7.3.60.0030.00614.89
7.3.50.0040.01214.88
7.3.40.0040.01114.89
7.3.30.0080.00814.86
7.3.20.0040.00816.59
7.3.10.0030.01016.86
7.3.00.0100.00716.41
7.2.330.0180.00316.74
7.2.320.0100.00716.58
7.2.310.0070.01016.73
7.2.300.0070.01016.60
7.2.290.0070.01016.54
7.2.250.0110.00715.02
7.2.240.0000.01314.95
7.2.230.0100.01015.06
7.2.220.0060.00915.15
7.2.210.0140.00315.18
7.2.200.0060.00914.89
7.2.190.0030.01115.05
7.2.180.0120.00614.95
7.2.170.0070.00714.77
7.2.160.0000.01315.12
7.2.150.0030.01016.96
7.2.140.0000.01616.82
7.2.130.0040.01417.09
7.2.120.0030.00617.02
7.2.110.0030.01017.07
7.2.100.0030.01217.13
7.2.90.0030.01016.98
7.2.80.0090.00317.09
7.2.70.0060.00917.03
7.2.60.0050.01216.87
7.2.50.0100.01016.99
7.2.40.0000.01416.78
7.2.30.0040.00816.89
7.2.20.0070.00716.74
7.2.10.0050.00516.94
7.2.00.0090.00718.22
7.1.330.0080.00915.84
7.1.320.0080.00416.02
7.1.310.0030.01615.85
7.1.300.0100.00715.73
7.1.290.0030.01315.74
7.1.280.0090.00616.01
7.1.270.0040.00415.90
7.1.260.0120.00615.95
7.1.250.0030.01215.86
7.1.240.0040.01115.61
7.1.230.0030.00715.76
7.1.220.0060.00916.04
7.1.210.0110.00015.87
7.1.200.0060.00515.78
7.1.190.0070.00715.80
7.1.180.0080.00815.77
7.1.170.0000.00915.81
7.1.160.0090.00615.98
7.1.150.0030.00615.66
7.1.140.0080.00315.90
7.1.130.0070.00315.78
7.1.120.0100.00316.00
7.1.110.0090.00316.00
7.1.100.0030.00817.15
7.1.90.0060.00915.88
7.1.80.0060.00615.80
7.1.70.0070.00716.65
7.1.60.0020.01217.74
7.1.50.0070.00415.93
7.1.40.0040.01115.91
7.1.30.0040.00716.04
7.1.20.0050.00315.71
7.1.10.0060.00915.75
7.1.00.0100.03719.12
7.0.330.0040.00715.18
7.0.320.0120.00315.23
7.0.310.0060.00315.39
7.0.300.0040.00815.61
7.0.290.0030.01015.55
7.0.280.0030.00915.18
7.0.270.0090.00615.52
7.0.260.0000.01215.59
7.0.250.0040.00815.77
7.0.240.0030.01015.42
7.0.230.0110.00315.34
7.0.220.0100.00015.30
7.0.210.0030.00915.57
7.0.200.0140.00614.90
7.0.190.0070.00715.68
7.0.180.0000.01415.48
7.0.170.0000.01315.68
7.0.160.0000.01115.82
7.0.150.0040.00415.63
7.0.140.0060.00615.55
7.0.130.0030.01215.58
7.0.120.0030.00715.67
7.0.110.0070.00715.43
7.0.100.0070.00715.55
7.0.90.0000.01215.63
7.0.80.0180.03617.76
7.0.70.0120.03917.83
7.0.60.0260.03017.86
7.0.50.0150.03917.85
7.0.40.0200.03017.08
7.0.30.0230.02816.83
7.0.20.0200.03516.76
7.0.10.0220.03216.94
7.0.00.0250.03216.93
5.6.400.0100.00314.27
5.6.390.0000.01314.29
5.6.380.0080.00414.34
5.6.370.0060.00914.04
5.6.360.0040.00714.16
5.6.350.0000.00914.27
5.6.340.0070.00713.79
5.6.330.0040.00914.25
5.6.320.0000.00913.94
5.6.310.0100.00313.84
5.6.300.0070.00714.21
5.6.290.0000.01814.27
5.6.280.0020.04417.64
5.6.270.0040.01114.11
5.6.260.0100.00414.33
5.6.250.0060.00314.03
5.6.240.0070.01014.11
5.6.230.0100.03917.47
5.6.220.0140.02817.39
5.6.210.0100.04017.65
5.6.200.0050.03817.61
5.6.190.0100.03417.67
5.6.180.0080.04017.65
5.6.170.0120.03417.69
5.6.160.0080.03617.80
5.6.150.0150.03017.77
5.6.140.0070.03517.63
5.6.130.0100.03217.67
5.6.120.0070.03717.69
5.6.110.0100.03317.74
5.6.100.0050.03617.59
5.6.90.0020.04217.54
5.6.80.0080.03517.29
5.6.70.0100.03117.28
5.6.60.0080.03817.23
5.6.50.0140.03617.30
5.6.40.0100.03317.27
5.6.30.0100.03117.37
5.6.20.0180.03117.34
5.6.10.0060.03117.33
5.6.00.0080.03517.40
5.5.380.0070.00714.20
5.5.370.0120.04017.15
5.5.360.0070.04817.24
5.5.350.0160.02817.24
5.5.340.0090.03117.33
5.5.330.0080.03517.20
5.5.320.0050.03717.38
5.5.310.0120.03217.42
5.5.300.0120.03317.55
5.5.290.0140.03117.37
5.5.280.0080.03517.59
5.5.270.0090.03317.50
5.5.260.0150.03217.61
5.5.250.0050.03817.21
5.5.240.0120.02717.08
5.5.230.0100.03117.15
5.5.220.0050.04717.15
5.5.210.0070.03417.04
5.5.200.0100.03117.05
5.5.190.0100.04416.95
5.5.180.0170.03516.94
5.5.170.0030.00513.99
5.5.160.0140.03317.08
5.5.150.0050.03717.07
5.5.140.0090.03117.23
5.5.130.0140.02716.88
5.5.120.0110.02917.16
5.5.110.0080.04316.87
5.5.100.0100.03116.93
5.5.90.0080.03116.91
5.5.80.0080.03016.98
5.5.70.0110.03016.81
5.5.60.0110.03117.07
5.5.50.0090.03117.02
5.5.40.0100.03217.00
5.5.30.0090.03116.96
5.5.20.0070.03316.89
5.5.10.0090.03316.90
5.5.00.0120.03217.00

preferences:
61.31 ms | 400 KiB | 5 Q