3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = "/companies/(\d+)/adverts/new/(\w+)/HERRO/(\d+)/"; $replace = array(2223, 'generic', 1234); $result = vsprintf(preg_replace('#\(.*?\)#', '%s', $string, count($replace)), $replace); var_dump($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.0060.00918.68
8.3.50.0100.00822.05
8.3.40.0110.00718.85
8.3.30.0090.00918.95
8.3.20.0050.00220.34
8.3.10.0070.00022.05
8.3.00.0050.00222.57
8.2.180.0090.01216.75
8.2.170.0140.00422.96
8.2.160.0070.01020.82
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0160.00326.16
8.2.120.0120.00619.36
8.2.110.0030.00622.20
8.2.100.0070.00419.58
8.2.90.0050.00319.27
8.2.80.0000.00817.97
8.2.70.0060.00317.63
8.2.60.0080.00017.91
8.2.50.0030.00518.07
8.2.40.0040.00418.09
8.2.30.0040.00418.20
8.2.20.0000.00817.82
8.2.10.0050.00217.88
8.2.00.0040.00417.78
8.1.280.0070.01125.92
8.1.270.0020.00522.10
8.1.260.0040.00426.35
8.1.250.0090.00028.09
8.1.240.0030.00624.01
8.1.230.0000.01119.16
8.1.220.0060.00317.78
8.1.210.0040.00418.77
8.1.200.0070.00317.11
8.1.190.0050.00317.55
8.1.180.0040.00418.67
8.1.170.0040.00418.68
8.1.160.0040.00421.96
8.1.150.0070.00018.75
8.1.140.0040.00417.63
8.1.130.0040.00417.77
8.1.120.0070.00017.68
8.1.110.0040.00417.66
8.1.100.0000.00717.53
8.1.90.0040.00417.61
8.1.80.0050.00317.57
8.1.70.0050.00317.56
8.1.60.0080.00017.70
8.1.50.0030.00617.55
8.1.40.0000.00717.60
8.1.30.0020.00517.73
8.1.20.0030.00617.74
8.1.10.0030.00617.50
8.1.00.0030.00617.41
8.0.300.0040.00418.77
8.0.290.0000.00717.15
8.0.280.0040.00418.31
8.0.270.0070.00017.21
8.0.260.0060.00016.96
8.0.250.0000.00717.04
8.0.240.0030.00617.06
8.0.230.0040.00417.10
8.0.220.0030.00516.95
8.0.210.0000.00717.00
8.0.200.0000.00716.90
8.0.190.0000.00717.01
8.0.180.0040.00417.04
8.0.170.0030.00517.04
8.0.160.0050.00216.97
8.0.150.0030.00417.04
8.0.140.0040.00417.00
8.0.130.0000.00513.50
8.0.120.0040.00416.89
8.0.110.0000.00717.07
8.0.100.0030.00617.15
8.0.90.0030.00517.00
8.0.80.0030.02117.00
8.0.70.0040.00416.98
8.0.60.0040.00416.98
8.0.50.0000.00716.91
8.0.30.0130.01017.17
8.0.20.0090.00917.40
8.0.10.0020.00516.97
8.0.00.0120.00916.94
7.4.330.0050.00015.16
7.4.320.0000.00716.72
7.4.300.0000.00616.82
7.4.290.0030.00316.64
7.4.280.0000.00816.80
7.4.270.0060.00016.80
7.4.260.0000.00716.77
7.4.250.0060.00316.77
7.4.240.0040.00416.76
7.4.230.0030.00316.65
7.4.220.0070.01016.78
7.4.210.0080.00716.78
7.4.200.0000.00716.71
7.4.190.0040.00416.77
7.4.160.0120.00316.53
7.4.150.0060.01217.40
7.4.140.0090.01017.86
7.4.130.0120.00716.60
7.4.120.0090.00816.57
7.4.110.0030.01316.82
7.4.100.0090.00916.55
7.4.90.0160.00316.50
7.4.80.0100.00719.39
7.4.70.0090.00916.51
7.4.60.0100.00716.61
7.4.50.0030.00616.41
7.4.40.0040.01422.77
7.4.30.0070.01016.63
7.4.00.0120.00315.11
7.3.330.0020.00313.19
7.3.320.0000.00613.29
7.3.310.0030.00316.41
7.3.300.0000.00616.35
7.3.290.0090.00616.42
7.3.280.0110.00916.35
7.3.270.0120.00617.40
7.3.260.0170.00716.38
7.3.250.0140.00616.48
7.3.240.0110.00616.57
7.3.230.0120.00916.43
7.3.210.0090.00916.57
7.3.200.0160.00919.39
7.3.190.0030.01816.54
7.3.180.0060.00916.65
7.3.170.0080.01116.27
7.3.160.0030.01316.44
7.3.120.0090.00314.80
7.2.330.0160.00316.70
7.2.320.0110.00716.71
7.2.310.0060.01016.94
7.2.300.0060.01116.82
7.2.290.0060.01116.70
7.2.00.0060.00619.43
7.1.100.0180.00718.04
7.1.70.0030.01217.43
7.1.60.0140.00719.82
7.1.50.0040.01817.10
7.1.00.0000.08022.37
7.0.200.0040.00416.80
7.0.140.0000.07722.18
7.0.60.0100.09021.86
7.0.50.0070.06717.82
7.0.40.0030.04319.93
7.0.30.0200.05320.14
7.0.20.0200.06720.14
7.0.10.0270.08020.13
7.0.00.0100.07020.02
5.6.210.0030.08020.62
5.6.200.0000.04318.22
5.6.190.0170.07720.56
5.6.180.3770.04320.55
5.6.170.0300.05320.38
5.6.160.0100.05020.49
5.6.150.0070.08318.18
5.6.140.0030.04018.21
5.6.130.0100.03318.12
5.6.120.0070.03720.99
5.6.110.0130.06021.03
5.6.100.0000.04320.88
5.6.90.0130.07020.87
5.6.80.0030.05020.36
5.5.350.4900.04720.45
5.5.340.0030.07317.99
5.5.330.0130.07720.19
5.5.320.0300.07320.32
5.5.310.0300.03020.27
5.5.300.0070.04717.91
5.5.290.0100.06718.00
5.5.280.0130.04720.76
5.5.270.0130.04320.86
5.5.260.0100.08320.86
5.5.250.0100.05320.79
5.5.240.0300.05720.25
5.4.450.0430.06019.64
5.4.440.0400.06319.58
5.4.430.0130.05319.30
5.4.420.0100.05319.46
5.4.410.0100.05019.57
5.4.400.0830.00018.53
5.4.390.0930.00018.70
5.4.380.0300.05018.67
5.4.370.0130.05718.71
5.4.360.0130.05018.76
5.4.350.0300.04718.57
5.4.340.0300.05018.72
5.4.320.0050.04012.45
5.4.310.0060.04212.45
5.4.300.0090.03612.45
5.4.290.0070.04712.45
5.4.280.0090.04212.34
5.4.270.0060.04412.34
5.4.260.0100.07018.64
5.4.250.0100.05318.77
5.4.240.0130.04718.87
5.4.230.0200.04718.94
5.4.220.0200.05018.77
5.4.210.0130.07318.65
5.4.200.0030.06318.88
5.4.190.0100.08018.89
5.4.180.0130.07018.76
5.4.170.0230.05318.99
5.4.160.0130.06718.93
5.4.150.0170.07718.71
5.4.140.0100.05316.48
5.4.130.0030.07016.23
5.4.120.0100.05016.21
5.4.110.0230.04716.27
5.4.100.0030.05316.23
5.4.90.0130.04716.45
5.4.80.0300.04716.35
5.4.70.0070.05316.37
5.4.60.0100.05716.25
5.4.50.0200.04316.33
5.4.40.0100.04716.37
5.4.30.0130.06016.37
5.4.20.0100.04716.46
5.4.10.0130.06316.39
5.4.00.0070.06015.98
5.3.290.0060.05112.80
5.3.280.0100.05714.29
5.3.270.0100.05314.62
5.3.260.0100.06014.61
5.3.250.0170.06314.70
5.3.240.0100.06314.61
5.3.230.0030.05714.48
5.3.220.0130.04314.57
5.3.210.0000.09014.45
5.3.200.0170.05314.58
5.3.190.0070.05314.44
5.3.180.0200.05714.48
5.3.170.0130.06314.58
5.3.160.0030.05314.43
5.3.150.0070.05714.33
5.3.140.0200.03714.41
5.3.130.0030.06714.32
5.3.120.0130.06714.43
5.3.110.0070.05314.46
5.3.100.0100.07013.90
5.3.90.0100.06013.71
5.3.80.0100.05014.16
5.3.70.0100.05013.89
5.3.60.0030.05314.04
5.3.50.0070.07013.99
5.3.40.0100.06014.04
5.3.30.0100.04313.92
5.3.20.0030.05313.80
5.3.10.0130.04313.54
5.3.00.0070.05313.50
5.2.170.0100.03711.13
5.2.160.0000.06011.13
5.2.150.0100.03711.30
5.2.140.0030.05311.15
5.2.130.0030.04311.20
5.2.120.0070.04011.00
5.2.110.0200.04311.02
5.2.100.0130.03710.98
5.2.90.0070.04011.00
5.2.80.0070.04311.08
5.2.70.0030.04010.93
5.2.60.0030.05010.99
5.2.50.0170.03311.04
5.2.40.0100.04010.76
5.2.30.0030.05310.89
5.2.20.0100.05010.90
5.2.10.0130.04710.69
5.2.00.0070.05710.79
5.1.60.0070.0339.96
5.1.50.0030.0509.98
5.1.40.0070.03310.02
5.1.30.0100.03310.54
5.1.20.0030.04010.17
5.1.10.0070.03310.15
5.1.00.0000.04710.29
5.0.50.0130.0308.60
5.0.40.0030.0278.48
5.0.30.0030.0438.36
5.0.20.0100.0208.19
5.0.10.0130.0178.41
5.0.00.0100.0338.20
4.4.90.0030.0277.22
4.4.80.0000.0307.22
4.4.70.0100.0177.22
4.4.60.0000.0277.22
4.4.50.0000.0237.22
4.4.40.0030.0337.22
4.4.30.0030.0307.22
4.4.20.0100.0237.22
4.4.10.0100.0237.22
4.4.00.0030.0337.22
4.3.110.0070.0177.22
4.3.100.0130.0107.22
4.3.90.0030.0207.22
4.3.80.0070.0307.22
4.3.70.0030.0207.22
4.3.60.0030.0207.22
4.3.50.0000.0337.22
4.3.40.0030.0337.22
4.3.30.0070.0177.22
4.3.20.0030.0207.22
4.3.10.0000.0237.22
4.3.00.0070.0177.80

preferences:
40.37 ms | 401 KiB | 5 Q