3v4l.org

run code in 300+ PHP versions simultaneously
<?php $re = '/\) VALUES (.+?(?=\)))/m'; $str = 'INSERT INTO table (`col1`, `col2`, `col3`) VALUES (\'oneVal\', \'twoVal\', \'threeVal\')'; $subst = ',`col4`) VALUES $1 , \'1\''; $result = preg_replace($re, $subst, $str); echo $result;

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.00718.56
8.3.50.0120.00621.25
8.3.40.0070.00718.80
8.3.30.0140.00019.02
8.3.20.0050.00321.90
8.3.10.0050.00320.16
8.3.00.0000.00823.70
8.2.180.0070.01518.67
8.2.170.0150.00022.96
8.2.160.0100.01022.20
8.2.150.0000.00824.18
8.2.140.0080.00024.66
8.2.130.0040.00426.16
8.2.120.0070.00021.17
8.2.110.0030.00622.27
8.2.100.0080.00418.02
8.2.90.0030.00617.88
8.2.80.0030.00619.18
8.2.70.0000.00917.93
8.2.60.0050.00318.16
8.2.50.0080.00018.10
8.2.40.0000.00719.36
8.2.30.0080.00019.37
8.2.20.0060.00317.95
8.2.10.0000.00920.40
8.2.00.0090.00219.42
8.1.280.0060.00925.92
8.1.270.0040.00423.99
8.1.260.0050.00326.35
8.1.250.0040.00428.09
8.1.240.0060.00620.60
8.1.230.0060.00619.21
8.1.220.0080.00017.79
8.1.210.0000.00818.77
8.1.200.0080.00017.48
8.1.190.0030.00717.10
8.1.180.0060.00318.10
8.1.170.0000.00818.77
8.1.160.0000.00718.86
8.1.150.0050.00318.76
8.1.140.0060.00617.43
8.1.130.0080.00418.43
8.1.120.0060.00517.55
8.1.110.0060.00617.52
8.1.100.0060.00517.46
8.1.90.0050.00717.54
8.1.80.0080.00517.45
8.1.70.0030.00917.56
8.1.60.0130.00317.71
8.1.50.0080.00617.52
8.1.40.0100.00417.58
8.1.30.0060.00717.62
8.1.20.0050.00917.66
8.1.10.0070.00717.63
8.1.00.0090.00617.52
8.0.300.0040.00420.21
8.0.290.0040.00416.84
8.0.280.0070.00018.39
8.0.270.0120.00816.82
8.0.260.0070.00616.89
8.0.250.0080.00317.04
8.0.240.0000.00816.92
8.0.230.0050.00516.83
8.0.220.0030.00716.90
8.0.210.0080.00216.91
8.0.200.0070.00517.00
8.0.190.0050.00516.97
8.0.180.0090.00316.93
8.0.170.0040.00616.86
8.0.160.0050.00316.91
8.0.150.0070.00416.79
8.0.140.0080.00416.82
8.0.130.0050.00615.07
8.0.120.0050.00616.91
8.0.110.0050.00616.83
8.0.100.0080.00416.80
8.0.90.0080.00416.80
8.0.80.0060.00916.92
8.0.70.0090.00416.80
8.0.60.0070.00416.93
8.0.50.0100.00216.89
8.0.30.0090.01017.15
8.0.20.0080.01017.07
8.0.10.0060.00617.06
8.0.00.0130.00616.88
7.4.330.0000.00715.92
7.4.320.0090.00316.67
7.4.300.0080.00316.55
7.4.290.0100.00416.62
7.4.280.0070.00516.60
7.4.270.0080.00416.70
7.4.260.0120.00016.57
7.4.250.0090.00316.60
7.4.240.0060.00616.51
7.4.230.0090.00416.64
7.4.220.0070.00316.58
7.4.210.0090.00816.67
7.4.200.0060.00616.66
7.4.190.0070.00716.65
7.4.180.0110.00616.62
7.4.160.0090.00516.49
7.4.150.0130.00216.62
7.4.140.0140.00016.43
7.4.130.0140.00216.59
7.4.120.0100.00916.54
7.4.110.0130.00316.55
7.4.100.0060.00916.53
7.4.90.0110.00516.67
7.4.80.0150.00517.92
7.4.70.0110.00416.66
7.4.60.0080.00716.65
7.4.50.0100.00516.49
7.4.40.0100.00516.47
7.4.30.0000.01316.55
7.4.20.0080.00816.59
7.4.10.0080.00715.95
7.4.00.0080.00515.67
7.3.330.0080.00414.73
7.3.320.0050.00614.69
7.3.310.0060.00416.27
7.3.300.0040.00816.27
7.3.290.0100.00616.32
7.3.280.0070.00916.35
7.3.270.0080.00816.30
7.3.260.0100.00916.41
7.3.250.0140.00016.39
7.3.240.0150.00016.30
7.3.230.0100.00816.54
7.3.220.0070.00716.30
7.3.210.0070.01016.51
7.3.200.0080.00916.33
7.3.190.0130.00516.43
7.3.180.0110.00516.31
7.3.170.0100.00716.34
7.3.160.0090.00616.47
7.3.150.0120.00516.30
7.3.140.0140.00316.30
7.3.130.0090.00815.91
7.3.120.0130.00415.77
7.3.110.0060.01115.94
7.3.100.0060.01015.79
7.3.90.0110.00415.92
7.3.80.0050.00815.96
7.3.70.0090.00615.59
7.3.60.0080.00615.57
7.3.50.0050.01115.68
7.3.40.0110.00615.65
7.3.30.0130.00315.57
7.3.20.0110.00616.99
7.3.10.0100.00817.05
7.3.00.0090.00517.10
7.2.340.0000.01116.39
7.2.330.0110.00716.50
7.2.320.0110.00616.39
7.2.310.0090.00616.67
7.2.300.0080.00916.56
7.2.290.0110.00716.58
7.2.280.0140.00016.54
7.2.270.0110.00416.31
7.2.260.0100.00616.03
7.2.250.0090.00616.12
7.2.240.0090.00616.05
7.2.230.0070.00916.06
7.2.220.0070.00916.17
7.2.210.0070.00816.07
7.2.200.0090.01015.82
7.2.190.0070.00815.80
7.2.180.0080.00815.90
7.2.170.0080.00715.88
7.2.160.0050.01215.89
7.2.150.0120.00717.14
7.2.140.0130.00317.25
7.2.130.0070.00917.18
7.2.120.0100.00717.17
7.2.110.0080.00817.31
7.2.100.0100.00717.21
7.2.90.0060.01217.30
7.2.80.0110.00717.25
7.2.70.0080.01117.32
7.2.60.0100.01017.28
7.2.50.0100.01017.31
7.2.40.0090.00817.33
7.2.30.0070.00817.21
7.2.20.0060.01217.15
7.2.10.0070.00817.32
7.2.00.0080.00817.32
7.1.330.0130.00516.31
7.1.320.0080.00716.22
7.1.310.0100.00416.29
7.1.300.0070.00816.10
7.1.290.0070.00916.16
7.1.280.0070.00916.18
7.1.270.0090.00816.18
7.1.260.0060.00916.03
7.1.250.0060.00816.11
7.1.240.0150.00516.28
7.1.230.0130.00616.27
7.1.220.0090.00916.30
7.1.210.0110.00516.31
7.1.200.0100.00616.30
7.1.190.0100.00716.20
7.1.180.0100.00516.08
7.1.170.0100.00516.20
7.1.160.0080.01116.12
7.1.150.0090.00916.18
7.1.140.0070.00916.18
7.1.130.0090.00816.26
7.1.120.0110.00716.21
7.1.110.0080.00816.36
7.1.100.0080.00716.32
7.1.90.0070.00816.24
7.1.80.0070.00716.22
7.1.70.0120.00216.21
7.1.60.0090.00516.39
7.1.50.0090.00516.41
7.1.40.0080.00916.25
7.1.30.0080.00716.26
7.1.20.0070.00716.36
7.1.10.0110.00416.28
7.1.00.0070.00916.26

preferences:
55.48 ms | 401 KiB | 5 Q