3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = '(a,b),a,b,c,(a,f)'; $str = preg_replace_callback('`("|\').*?\1`', function ($matches) { return preg_replace('`(?<!\\\)[()]`', '\\\;', $matches[0]); }, $str); echo $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.0100.00716.73
8.3.50.0070.01022.00
8.3.40.0110.00718.82
8.3.30.0090.00918.79
8.3.20.0000.00819.16
8.3.10.0080.00021.59
8.3.00.0080.00020.77
8.2.180.0090.00616.75
8.2.170.0090.00622.96
8.2.160.0100.00720.38
8.2.150.0050.00324.18
8.2.140.0070.01124.66
8.2.130.0080.00026.16
8.2.120.0080.00021.14
8.2.110.0030.00622.38
8.2.100.0040.00717.84
8.2.90.0030.00519.25
8.2.80.0000.00917.97
8.2.70.0000.00917.75
8.2.60.0030.00617.92
8.2.50.0060.00318.10
8.2.40.0030.00622.37
8.2.30.0040.00419.34
8.2.20.0000.00817.77
8.2.10.0040.00418.02
8.2.00.0040.00418.02
8.1.280.0170.00325.92
8.1.270.0040.00423.87
8.1.260.0090.00626.35
8.1.250.0080.00028.09
8.1.240.0040.00723.64
8.1.230.0070.00421.00
8.1.220.0030.00517.74
8.1.210.0080.00018.77
8.1.200.0060.00317.38
8.1.190.0080.00017.35
8.1.180.0080.00018.10
8.1.170.0030.00518.67
8.1.160.0060.00319.04
8.1.150.0070.00018.97
8.1.140.0040.00419.55
8.1.130.0030.00317.61
8.1.120.0100.00017.57
8.1.110.0030.00517.59
8.1.100.0040.00417.66
8.1.90.0040.00417.52
8.1.80.0020.00517.64
8.1.70.0000.00717.61
8.1.60.0030.00617.73
8.1.50.0040.00417.62
8.1.40.0000.00817.69
8.1.30.0000.00817.75
8.1.20.0020.00517.82
8.1.10.0000.00817.64
8.1.00.0040.00717.66
8.0.300.0000.00718.77
8.0.290.0040.00416.75
8.0.280.0000.00718.38
8.0.270.0000.00717.28
8.0.260.0030.00317.19
8.0.250.0030.00317.09
8.0.240.0030.00317.13
8.0.230.0040.00416.94
8.0.220.0040.00416.94
8.0.210.0000.00717.02
8.0.200.0090.00016.99
8.0.190.0080.00016.99
8.0.180.0070.00016.96
8.0.170.0040.00417.06
8.0.160.0030.00317.00
8.0.150.0040.00416.96
8.0.140.0110.00016.91
8.0.130.0040.00413.38
8.0.120.0020.00517.00
8.0.110.0020.00517.09
8.0.100.0000.00816.91
8.0.90.0070.00016.91
8.0.80.0030.01217.02
8.0.70.0000.00717.08
8.0.60.0040.00416.89
8.0.50.0050.00317.07
8.0.30.0120.00917.21
8.0.20.0090.01117.40
8.0.10.0000.00817.23
8.0.00.0100.00616.94
7.4.330.0020.00215.08
7.4.320.0030.00316.82
7.4.300.0030.00316.67
7.4.290.0030.00316.70
7.4.280.0000.00816.77
7.4.270.0000.00716.80
7.4.260.0030.00316.66
7.4.250.0000.01016.74
7.4.240.0000.00716.71
7.4.230.0030.00316.90
7.4.220.0160.00916.70
7.4.210.0110.00716.86
7.4.200.0030.00316.69
7.4.160.0090.00616.65
7.4.150.0110.00717.40
7.4.140.0100.01917.86
7.4.130.0140.00516.74
7.4.120.0110.00616.76
7.4.110.0070.01116.69
7.4.100.0070.01016.77
7.4.90.0150.00616.77
7.4.80.0130.01019.39
7.4.70.0110.00616.73
7.4.60.0100.01016.65
7.4.50.0000.01116.63
7.4.40.0160.00316.50
7.4.30.0090.00616.66
7.4.00.0000.01315.08
7.3.330.0030.00313.41
7.3.320.0060.00013.29
7.3.310.0000.00816.36
7.3.300.0000.00716.47
7.3.290.0050.01116.47
7.3.280.0060.00916.46
7.3.270.0150.00917.40
7.3.260.0100.00616.71
7.3.250.0090.00916.54
7.3.240.0100.00916.58
7.3.230.0140.00316.39
7.3.210.0070.01016.46
7.3.200.0070.01016.67
7.3.190.0030.01516.70
7.3.180.0160.00616.62
7.3.170.0160.00716.65
7.3.160.0110.00716.46
7.3.120.0090.00614.91
7.3.110.0080.00814.99
7.3.100.0030.01314.83
7.3.90.0040.01215.16
7.3.80.0130.00315.18
7.3.70.0090.00614.84
7.3.60.0100.00314.97
7.3.50.0030.01215.00
7.3.40.0000.01414.93
7.3.30.0090.00614.76
7.3.20.0030.01416.86
7.3.10.0000.01416.66
7.3.00.0080.00016.74
7.2.330.0140.00316.61
7.2.320.0120.01516.68
7.2.310.0110.01416.73
7.2.300.0130.00416.64
7.2.290.0080.01216.72
7.2.240.0070.00715.25
7.2.230.0030.00815.24
7.2.220.0070.00715.18
7.2.210.0090.00614.92
7.2.200.0030.00915.09
7.2.190.0100.00715.05
7.2.180.0100.00714.90
7.2.170.0040.01515.30
7.2.160.0120.00615.32
7.2.150.0140.00416.86
7.2.140.0060.00916.96
7.2.130.0120.00317.04
7.2.120.0040.00816.99
7.2.110.0070.00717.08
7.2.100.0090.00316.80
7.2.90.0100.00617.06
7.2.80.0110.00516.88
7.2.70.0030.01017.14
7.2.60.0050.01117.08
7.2.50.0120.00316.81
7.2.40.0030.01017.13
7.2.30.0070.00717.10
7.2.20.0040.01116.82
7.2.10.0130.00317.01
7.2.00.0030.01118.40
7.1.330.0030.01315.81
7.1.320.0070.00716.07
7.1.310.0030.01015.57
7.1.300.0090.00615.62
7.1.290.0040.01115.88
7.1.280.0040.01115.77
7.1.270.0040.01115.89
7.1.260.0000.01115.84
7.1.250.0060.00615.69
7.1.200.0060.00916.09
7.1.100.0000.01118.35
7.1.70.0000.00717.37
7.1.60.0130.01019.47
7.1.00.0070.07322.54
7.0.200.0000.01016.81
7.0.60.1070.07019.96
7.0.50.1270.05720.46
7.0.40.0970.06020.31
7.0.30.1000.05720.26
7.0.20.1000.06320.30
7.0.10.0870.06020.20
7.0.00.0970.06020.28
5.6.280.0030.07321.15
5.6.210.1030.05020.54
5.6.200.1330.07721.04
5.6.190.0930.05721.02
5.6.180.0900.05321.07
5.6.170.0800.07321.06
5.6.160.0900.06721.26
5.6.150.1070.06721.07
5.6.140.0870.05321.04
5.6.130.1170.05321.20
5.6.120.0230.05021.05
5.6.110.0170.05321.00
5.6.100.0900.06020.94
5.6.90.1270.08020.92
5.6.80.0900.07320.44
5.6.70.0970.07020.43
5.6.60.0700.07020.42
5.6.50.0800.06320.44
5.6.40.0170.05020.41
5.6.30.0170.05020.54
5.6.20.1300.08020.48
5.6.10.1170.05020.37
5.6.00.1270.06320.36
5.5.350.1030.05320.50
5.5.340.1030.07321.04
5.5.330.1100.07720.85
5.5.320.0770.07021.04
5.5.310.0800.09720.96
5.5.300.1000.05320.86
5.5.290.1200.07320.96
5.5.280.0400.06720.86
5.5.270.1070.05721.02
5.5.260.1300.07720.84
5.5.250.1170.07320.84
5.5.240.0930.06020.39
5.5.230.1030.07320.21
5.5.220.1030.05320.09
5.5.210.0800.05020.34
5.5.200.1030.07320.21
5.5.190.0830.07020.22
5.5.180.0900.07320.31
5.5.160.1300.06320.38
5.5.150.0770.06020.39
5.5.140.1000.04720.30
5.5.130.0700.06320.37
5.5.120.0900.05720.22
5.5.110.0830.06320.14
5.5.100.0130.07320.20
5.5.90.0430.07720.26
5.5.80.0970.05019.96
5.5.70.0730.06719.99
5.5.60.1070.08020.09
5.5.50.0970.08020.23
5.5.40.1100.09320.07
5.5.30.1070.07720.09
5.5.20.1130.07020.17
5.5.10.0870.08020.07
5.5.00.1230.07020.12

preferences:
57.13 ms | 401 KiB | 5 Q