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) { 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.0120.00318.31
8.3.50.0090.01022.16
8.3.40.0180.00618.70
8.3.30.0070.00719.10
8.3.20.0040.00420.16
8.3.10.0000.00822.09
8.3.00.0000.00822.27
8.2.180.0140.00716.63
8.2.170.0090.00622.96
8.2.160.0140.00021.07
8.2.150.0090.00024.18
8.2.140.0000.00924.66
8.2.130.0120.00626.16
8.2.120.0080.00019.61
8.2.110.0040.00722.37
8.2.100.0080.00317.97
8.2.90.0040.00419.05
8.2.80.0000.00817.97
8.2.70.0060.00317.75
8.2.60.0040.00417.93
8.2.50.0050.00318.07
8.2.40.0040.00418.22
8.2.30.0080.00018.07
8.2.20.0000.00917.74
8.2.10.0070.00017.77
8.2.00.0040.00417.84
8.1.280.0140.00725.92
8.1.270.0090.00922.13
8.1.260.0080.00026.35
8.1.250.0050.00328.09
8.1.240.0110.00020.99
8.1.230.0090.00317.59
8.1.220.0000.00817.77
8.1.210.0040.00418.77
8.1.200.0060.00317.48
8.1.190.0080.00017.39
8.1.180.0050.00318.66
8.1.170.0080.00018.58
8.1.160.0050.00322.04
8.1.150.0000.00718.72
8.1.140.0000.00717.47
8.1.130.0040.00417.73
8.1.120.0000.00717.50
8.1.110.0030.00517.54
8.1.100.0040.00417.62
8.1.90.0040.00417.51
8.1.80.0040.00417.52
8.1.70.0030.00317.54
8.1.60.0030.00517.72
8.1.50.0040.00417.56
8.1.40.0080.00017.57
8.1.30.0040.00417.64
8.1.20.0040.00417.81
8.1.10.0040.00417.63
8.1.00.0050.00317.63
8.0.300.0040.00418.77
8.0.290.0040.00416.75
8.0.280.0000.00718.45
8.0.270.0080.00017.19
8.0.260.0000.00716.86
8.0.250.0030.00317.14
8.0.240.0000.00917.13
8.0.230.0050.00216.95
8.0.220.0000.00717.05
8.0.210.0000.00716.91
8.0.200.0000.00716.98
8.0.190.0030.00517.09
8.0.180.0000.00717.10
8.0.170.0070.00017.05
8.0.160.0080.00016.84
8.0.150.0000.00716.83
8.0.140.0080.00016.83
8.0.130.0050.00513.41
8.0.120.0060.00317.00
8.0.110.0000.00716.91
8.0.100.0000.00717.00
8.0.90.0040.00417.06
8.0.80.0100.01317.07
8.0.70.0040.00417.07
8.0.60.0070.00016.91
8.0.50.0020.00517.02
8.0.30.0130.00617.13
8.0.20.0120.00717.40
8.0.10.0080.00016.93
8.0.00.0050.01216.95
7.4.330.0060.00015.12
7.4.320.0000.00616.85
7.4.300.0070.00016.70
7.4.290.0030.00316.70
7.4.280.0050.00316.75
7.4.270.0030.00316.71
7.4.260.0070.00016.78
7.4.250.0030.00616.77
7.4.240.0050.00316.82
7.4.230.0050.00316.63
7.4.220.0140.00316.74
7.4.210.0050.01016.77
7.4.200.0070.00016.90
7.4.190.0000.00716.69
7.4.160.0170.00016.40
7.4.150.0110.00617.40
7.4.140.0170.00517.86
7.4.130.0090.01116.80
7.4.120.0070.01016.65
7.4.110.0100.01316.79
7.4.100.0140.00416.66
7.4.90.0030.01416.65
7.4.80.0060.01219.39
7.4.70.0100.00716.87
7.4.60.0130.00716.66
7.4.50.0000.01116.54
7.4.40.0040.00722.77
7.4.30.0060.00916.85
7.4.00.0100.00515.30
7.3.330.0050.00013.43
7.3.320.0030.00313.28
7.3.310.0070.00016.34
7.3.300.0070.00016.45
7.3.290.0060.00916.46
7.3.280.0080.00916.45
7.3.270.0110.00717.40
7.3.260.0150.00916.72
7.3.250.0050.01316.61
7.3.240.0100.00716.43
7.3.230.0090.01116.70
7.3.210.0110.00616.37
7.3.200.0130.00919.39
7.3.190.0090.00916.53
7.3.180.0060.01616.58
7.3.170.0110.01116.73
7.3.160.0030.01416.80
7.3.120.0060.01115.15
7.3.110.0140.00314.78
7.3.100.0060.01315.18
7.3.90.0070.00714.95
7.3.80.0160.00015.18
7.3.70.0040.01115.00
7.3.60.0030.00915.13
7.3.50.0070.00714.61
7.3.40.0070.00714.72
7.3.30.0000.01515.02
7.3.20.0120.00316.89
7.3.10.0750.00416.84
7.3.00.0060.00916.70
7.2.330.0110.00716.95
7.2.320.0090.00916.66
7.2.310.0110.01216.82
7.2.300.0140.00416.62
7.2.290.0100.00716.74
7.2.250.0070.01115.18
7.2.240.0160.00315.34
7.2.230.0030.01315.00
7.2.220.0040.01115.29
7.2.210.0040.01115.06
7.2.200.0000.01515.36
7.2.190.0030.01015.06
7.2.180.0040.01115.06
7.2.170.0070.00415.00
7.2.60.0030.01317.02
7.2.00.0040.01419.54
7.1.330.0030.01215.55
7.1.320.0000.00915.89
7.1.310.0070.00716.05
7.1.300.0090.00615.66
7.1.290.0040.00415.60
7.1.280.0070.00715.86
7.1.270.0090.00315.85
7.1.260.0120.00315.94
7.1.200.0060.00615.55
7.1.100.0140.00718.02
7.1.70.0070.01017.41
7.1.60.0170.00719.82
7.1.50.0030.02117.26
7.1.00.0070.07322.43
7.0.200.0040.00417.03
7.0.140.0100.06722.11
7.0.100.0230.05019.93
7.0.90.0230.07719.87
7.0.80.0270.08019.89
7.0.70.0270.07719.98
7.0.60.0330.07719.78
7.0.50.0300.06020.31
7.0.40.0030.04320.12
7.0.30.0130.08320.19
7.0.20.0030.07720.15
7.0.10.0030.07719.94
7.0.00.0130.07720.09
5.6.280.0100.06321.15
5.6.250.0130.06020.75
5.6.240.0030.07320.52
5.6.230.0170.08020.69
5.6.220.0130.07320.75
5.6.210.0170.05020.77
5.6.200.0030.06021.09
5.6.190.0170.07321.05
5.6.180.0130.06321.09
5.6.170.0030.08321.04
5.6.160.0130.07321.09
5.6.150.0000.07021.05
5.6.140.0000.05721.04
5.6.130.0070.08320.92
5.6.120.0170.04321.14
5.6.110.0100.08021.05
5.6.100.0200.07021.16
5.6.90.0130.07721.15
5.6.80.0100.07720.45
5.6.70.0070.07020.35
5.6.60.0100.07720.46
5.6.50.0000.04320.50
5.6.40.0070.03720.36
5.6.30.0030.04020.44
5.6.20.0030.04020.29
5.6.10.0030.04020.53
5.6.00.0070.03720.39
5.5.380.0100.06320.41
5.5.370.0100.07320.43
5.5.360.0070.06720.32
5.5.350.0070.07720.41
5.5.340.0100.03720.88
5.5.330.0100.06320.88
5.5.320.0030.07720.92
5.5.310.0230.07320.93
5.5.300.0070.08320.88
5.5.290.0070.08720.93
5.5.280.0070.07720.94
5.5.270.0070.07320.86
5.5.260.0070.09020.89
5.5.250.0170.06720.72
5.5.240.0100.04720.26
5.5.230.0070.08020.16
5.5.220.0130.05720.17
5.5.210.0030.05720.18
5.5.200.0130.05020.13
5.5.190.0000.04320.08
5.5.180.0000.05020.28
5.5.160.0070.03720.14
5.5.150.0100.04320.26
5.5.140.0000.04020.11
5.5.130.0130.03720.23
5.5.120.0030.06020.18
5.5.110.0130.05720.17
5.5.100.0070.08020.08
5.5.90.0070.07719.95
5.5.80.0000.04020.10
5.5.70.0100.03320.06
5.5.60.0070.05019.92
5.5.50.0000.04720.14
5.5.40.0000.04020.15
5.5.30.0000.04320.06
5.5.20.0030.04020.00
5.5.10.0000.04319.98
5.5.00.0100.04020.08
5.4.450.0170.05719.47
5.4.440.0030.08019.45
5.4.430.0070.06719.36
5.4.420.0030.06719.58
5.4.410.0100.07019.36
5.4.400.0170.06719.05
5.4.390.0170.07318.85
5.4.380.0170.06019.09
5.4.370.0130.05018.95
5.4.360.0070.04719.15
5.4.350.0030.04018.95
5.4.340.0000.04019.05
5.4.320.0100.03318.88
5.4.310.0000.04019.04
5.4.300.0000.04018.95
5.4.290.0030.04018.90
5.4.280.0100.03719.12
5.4.270.0000.04018.89
5.4.260.0030.06719.18
5.4.250.0100.03318.84
5.4.240.0100.03319.25
5.4.230.0070.03718.90
5.4.220.0030.03719.06
5.4.210.0000.06019.12
5.4.200.0000.06019.09
5.4.190.0000.04019.13
5.4.180.0030.03719.02
5.4.170.0070.03319.20
5.4.160.0030.03719.10
5.4.150.0000.04019.07
5.4.140.0030.03716.20
5.4.130.0000.04016.27
5.4.120.0030.03316.41
5.4.110.0000.04316.59
5.4.100.0070.03716.52
5.4.90.0070.03016.34
5.4.80.0030.03716.41
5.4.70.0070.03316.42
5.4.60.0030.03716.34
5.4.50.0030.04016.48
5.4.40.0100.02716.35
5.4.30.0000.04016.44
5.4.20.0030.03716.39
5.4.10.0030.03716.36
5.4.00.0030.03315.88
5.3.290.0030.04714.70
5.3.280.0070.04014.55
5.3.270.0030.03714.70
5.3.260.0030.03714.59
5.3.250.0030.04014.58
5.3.240.0030.03714.63
5.3.230.0000.04014.66
5.3.220.0030.04714.62
5.3.210.0000.04014.50
5.3.200.0070.03314.54
5.3.190.0000.04014.67
5.3.180.0000.04014.65
5.3.170.0070.04314.63
5.3.160.0000.04014.48
5.3.150.0070.03314.59
5.3.140.0000.04314.56
5.3.130.0100.03714.68
5.3.120.0070.03314.68
5.3.110.0000.04014.63
5.3.100.0130.02714.01
5.3.90.0030.03714.00
5.3.80.0070.03314.03
5.3.70.0000.04314.12
5.3.60.0030.03714.12
5.3.50.0070.03714.09
5.3.40.0100.03013.88
5.3.30.0100.03013.91
5.3.20.0070.06713.68
5.3.10.0130.06013.57
5.3.00.0030.07013.62
5.2.170.0030.03011.13
5.2.160.0000.03011.02
5.2.150.0030.06311.16
5.2.140.0130.06010.98
5.2.130.0000.06311.16
5.2.120.0000.05310.96
5.2.110.0000.06310.95
5.2.100.0070.05311.15
5.2.90.0030.05311.06
5.2.80.0030.05011.09
5.2.70.0030.06311.02
5.2.60.0030.06011.00
5.2.50.0030.02711.02
5.2.40.0030.06010.82
5.2.30.0030.02710.94
5.2.20.0000.06710.96
5.2.10.0130.03710.72
5.2.00.0000.06310.68
5.1.60.0070.05010.07
5.1.50.0070.05010.00
5.1.40.0070.03710.00
5.1.30.0000.02710.39
5.1.20.0070.05010.36
5.1.10.0000.03710.12
5.1.00.0000.02710.13
5.0.50.0000.0439.64
5.0.40.0000.0439.64
5.0.30.0000.0579.64
5.0.20.0100.0379.64
5.0.10.0000.0209.64
5.0.00.0070.0609.64
4.4.90.0000.0309.64
4.4.80.0000.0379.64
4.4.70.0030.0179.64
4.4.60.0000.0309.64
4.4.50.0030.0379.64
4.4.40.0000.0279.64
4.4.30.0000.0409.64
4.4.20.0000.0139.64
4.4.10.0000.0179.64
4.4.00.0000.0479.64
4.3.110.0000.0339.64
4.3.100.0070.0109.64
4.3.90.0000.0339.64
4.3.80.0070.0439.64
4.3.70.0000.0139.64
4.3.60.0000.0379.64
4.3.50.0070.0309.64
4.3.40.0030.0309.64
4.3.30.0030.0339.64
4.3.20.0000.0339.64
4.3.10.0000.0309.64
4.3.00.0000.0239.64

preferences:
43.96 ms | 401 KiB | 5 Q