3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = "/companies/(\d+)/adverts/new/(\d+)"; $replace = array(2223, 'generic'); $result = preg_replace_callback('#'.$string.'#', function($m) use ($replace) { return 'h'; }, $string); 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.0090.00618.52
8.3.50.0170.00522.10
8.3.40.0120.00618.82
8.3.30.0110.00418.96
8.3.20.0040.00420.30
8.3.10.0040.00422.09
8.3.00.0060.00322.42
8.2.180.0090.00618.63
8.2.170.0110.00322.96
8.2.160.0030.01021.07
8.2.150.0080.00024.18
8.2.140.0080.00024.66
8.2.130.0150.00326.16
8.2.120.0040.00419.45
8.2.110.0030.00622.15
8.2.100.0070.00717.91
8.2.90.0080.00019.27
8.2.80.0040.00417.97
8.2.70.0030.00617.75
8.2.60.0000.00818.04
8.2.50.0050.00318.07
8.2.40.0030.00617.97
8.2.30.0000.00718.07
8.2.20.0040.00417.79
8.2.10.0000.00717.85
8.2.00.0020.00517.78
8.1.280.0100.00325.92
8.1.270.0030.00522.01
8.1.260.0000.00826.35
8.1.250.0110.00428.09
8.1.240.0030.00721.07
8.1.230.0070.00317.58
8.1.220.0030.00617.79
8.1.210.0090.00018.77
8.1.200.0040.00417.48
8.1.190.0050.00317.50
8.1.180.0040.00418.71
8.1.170.0050.00318.75
8.1.160.0040.00422.04
8.1.150.0000.00818.79
8.1.140.0000.00717.60
8.1.130.0050.00217.69
8.1.120.0000.00717.50
8.1.110.0090.00017.52
8.1.100.0040.00417.50
8.1.90.0050.00217.65
8.1.80.0040.00417.58
8.1.70.0000.00717.63
8.1.60.0030.00617.71
8.1.50.0000.00817.68
8.1.40.0030.00617.63
8.1.30.0040.00417.75
8.1.20.0000.00917.70
8.1.10.0030.00517.55
8.1.00.0030.00517.62
8.0.300.0080.00018.77
8.0.290.0000.00716.75
8.0.280.0030.00318.42
8.0.270.0000.00717.23
8.0.260.0040.00416.88
8.0.250.0070.00017.07
8.0.240.0030.00617.03
8.0.230.0000.00717.07
8.0.220.0030.00316.93
8.0.210.0070.00017.05
8.0.200.0000.00817.06
8.0.190.0000.00717.11
8.0.180.0040.00417.10
8.0.170.0000.00716.93
8.0.160.0040.00416.95
8.0.150.0040.00416.98
8.0.140.0080.00016.99
8.0.130.0050.00313.53
8.0.120.0030.00616.96
8.0.110.0020.00516.93
8.0.100.0050.00217.04
8.0.90.0020.00517.07
8.0.80.0060.01317.04
8.0.70.0000.00716.93
8.0.60.0000.00716.99
8.0.50.0020.00517.05
8.0.30.0120.01517.07
8.0.20.0120.00617.47
8.0.10.0040.00416.97
8.0.00.0100.00816.90
7.4.330.0030.00315.00
7.4.320.0060.00016.60
7.4.300.0000.00616.61
7.4.290.0070.00016.79
7.4.280.0060.00016.67
7.4.270.0030.00316.78
7.4.260.0000.00816.68
7.4.250.0040.00416.69
7.4.240.0040.00316.80
7.4.230.0070.00016.57
7.4.220.0070.01116.66
7.4.210.0060.00816.83
7.4.200.0030.00316.81
7.4.190.0000.00816.68
7.4.160.0100.00716.86
7.4.150.0110.00717.40
7.4.140.0130.00717.86
7.4.130.0090.00816.64
7.4.120.0090.00816.79
7.4.110.0030.01316.92
7.4.100.0040.01316.64
7.4.90.0150.00316.75
7.4.80.0140.01419.39
7.4.70.0040.01316.69
7.4.60.0140.01116.70
7.4.50.0000.00616.70
7.4.40.0030.01022.77
7.4.30.0030.01316.69
7.4.00.0070.01015.14
7.3.330.0000.00513.46
7.3.320.0030.00313.36
7.3.310.0040.00416.31
7.3.300.0070.00016.44
7.3.290.0030.01116.46
7.3.280.0070.01016.44
7.3.270.0110.00717.40
7.3.260.0120.01516.44
7.3.250.0140.00616.47
7.3.240.0140.00316.62
7.3.230.0070.01416.70
7.3.210.0080.00816.52
7.3.200.0090.01319.39
7.3.190.0110.01116.64
7.3.180.0100.00716.52
7.3.170.0100.00816.68
7.3.160.0100.00616.63
7.3.120.0000.01614.96
7.2.330.0060.01016.54
7.2.320.0100.00716.72
7.2.310.0130.01016.63
7.2.300.0100.00716.78
7.2.290.0130.00316.64
7.2.00.0100.00619.68
7.1.100.0170.00718.19
7.1.70.0000.01217.40
7.1.60.0130.01319.82
7.1.50.0070.01717.31
7.1.00.0130.06322.39
7.0.200.0030.00316.52
7.0.140.0030.07322.15
7.0.60.0130.08019.93
7.0.50.0130.07717.93
7.0.40.0130.03720.28
7.0.30.0270.07720.17
7.0.20.0200.05320.25
7.0.10.0130.04720.09
7.0.00.0030.08020.20
5.6.280.0000.07720.93
5.6.210.0070.03720.55
5.6.200.0030.04018.19
5.6.190.0130.06320.68
5.6.180.3400.04320.46
5.6.170.0530.06720.55
5.6.160.0100.09020.44
5.6.150.0000.04318.17
5.6.140.0070.08318.15
5.6.130.0130.08018.15
5.6.120.0100.05721.02
5.6.110.0070.08321.01
5.6.100.0000.04721.02
5.6.90.0170.07320.98
5.6.80.0070.07020.51
5.6.70.0170.08020.36
5.5.350.0030.08720.33
5.5.340.0030.08017.98
5.5.330.0100.07720.33
5.5.320.0300.03720.25
5.5.310.0430.07320.32
5.5.300.0000.04318.04
5.5.290.0070.07717.98
5.5.280.0100.08020.65
5.5.270.0030.05020.87
5.5.260.0070.04020.77
5.5.250.0130.05720.77
5.5.240.0130.04720.36
5.4.450.0370.05319.61
5.4.440.0500.06019.38
5.4.430.0100.05319.36
5.4.420.0130.05019.39
5.4.410.0170.07319.46
5.4.400.0930.00018.84
5.4.390.0870.00018.58
5.4.380.0070.08318.78
5.4.370.0270.05718.73
5.4.360.0300.06018.72
5.4.350.0500.03718.79
5.4.340.0230.05318.72
5.4.320.0060.04512.50
5.4.310.0060.04012.50
5.4.300.0080.03512.50
5.4.290.0020.04312.50
5.4.280.0100.04412.39
5.4.270.0060.03612.40
5.4.260.0100.05318.80
5.4.250.0130.05018.76
5.4.240.0130.05718.74
5.4.230.0130.07018.79
5.4.220.0070.05718.96
5.4.210.0200.04318.76
5.4.200.0070.06319.02
5.4.190.0170.05018.93
5.4.180.0100.05018.64
5.4.170.0100.06018.81
5.4.160.0130.06018.93
5.4.150.0030.06018.80
5.4.140.0200.04016.40
5.4.130.0100.06016.39
5.4.120.0070.04716.34
5.4.110.0130.04716.46
5.4.100.0030.05316.32
5.4.90.0000.06016.49
5.4.80.0070.05016.60
5.4.70.0100.05016.60
5.4.60.0200.04016.44
5.4.50.0100.05016.30
5.4.40.0130.04316.68
5.4.30.0100.04316.62
5.4.20.0130.04716.45
5.4.10.0070.06016.46
5.4.00.0170.06316.01
5.3.290.0060.03912.80
5.3.280.0100.05014.68
5.3.270.0230.07014.44
5.3.260.0230.06714.73
5.3.250.0200.06314.69
5.3.240.0100.05014.70
5.3.230.0130.07314.73
5.3.220.0030.05314.48
5.3.210.0100.05714.65
5.3.200.0000.06314.63
5.3.190.0200.04714.63
5.3.180.0030.06014.53
5.3.170.0130.04714.63
5.3.160.0130.04714.70
5.3.150.0100.05014.63
5.3.140.0070.07014.39
5.3.130.0100.05314.63
5.3.120.0130.07714.68
5.3.110.0100.05314.38
5.3.100.0130.07014.21
5.3.90.0170.05314.03
5.3.80.0100.05014.00
5.3.70.0070.05313.85
5.3.60.0130.05713.98
5.3.50.0200.05013.95
5.3.40.0070.06714.11
5.3.30.0030.07713.98
5.3.20.0030.05313.76
5.3.10.0030.05013.64
5.3.00.0100.05013.61
5.2.170.0070.04711.04
5.2.160.0070.04311.17
5.2.150.0070.05011.03
5.2.140.0070.05011.16
5.2.130.0100.03311.19
5.2.120.0030.04311.12
5.2.110.0000.06011.01
5.2.100.0070.05311.01
5.2.90.0100.04310.93
5.2.80.0130.03711.11
5.2.70.0170.05011.09
5.2.60.0100.04010.88
5.2.50.0100.04311.17
5.2.40.0030.05011.00
5.2.30.0130.05710.85
5.2.20.0070.04310.95
5.2.10.0100.03711.07
5.2.00.0000.04310.64
5.1.60.0130.0239.77
5.1.50.0000.0409.93
5.1.40.0070.03010.02
5.1.30.0070.03310.34
5.1.20.0070.03310.28
5.1.10.0100.03010.13
5.1.00.0070.0339.92
5.0.50.0030.0378.56
5.0.40.0030.0278.64
5.0.30.0030.0538.56
5.0.20.0000.0378.56
5.0.10.0130.0208.56
5.0.00.0030.0408.56
4.4.90.0070.0208.56
4.4.80.0070.0308.56
4.4.70.0000.0338.56
4.4.60.0100.0238.56
4.4.50.0100.0138.56
4.4.40.0000.0478.56
4.4.30.0030.0208.56
4.4.20.0000.0238.56
4.4.10.0000.0238.56
4.4.00.0030.0338.56
4.3.110.0000.0238.56
4.3.100.0070.0238.56
4.3.90.0100.0138.56
4.3.80.0000.0338.56
4.3.70.0000.0238.56
4.3.60.0030.0238.56
4.3.50.0030.0238.56
4.3.40.0000.0338.56
4.3.30.0030.0238.56
4.3.20.0000.0238.56
4.3.10.0000.0278.56
4.3.00.0130.0177.80

preferences:
73.66 ms | 401 KiB | 5 Q