3v4l.org

run code in 300+ PHP versions simultaneously
<?php //this code will append a &mobileapp to every https://example.com url and http://foobar.com url ob_start(function($buffer){ $append = 'mobileapp'; $domain = '(?:'.preg_quote('example.com/~hillybilly') .'|'. '(?.*?\.)?'.preg_quote('foobar.com') .')'; $regex = '/\b(https?:\/\/'.$domain .'\/?)([a-z0-9\._\/~%\-\+&\#!=\(\)@]*)?([?])?([a-z0-9\._\/~%\-\+&\#!=\(\)@]*)?/igm'; $buffer = preg_replace($regex, '$1$2?'.$append.'&$4', $buffer); return $buffer; }); ?> http://foobar.com http://www.example.com/~hillybilly/foobar.php ob_end_flush();

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.40.0070.00718.75
8.3.30.0110.00420.37
8.3.20.0070.00020.25
8.3.10.0000.00822.09
8.3.00.0080.00022.51
8.2.170.0110.01122.96
8.2.160.0070.00722.12
8.2.150.0040.00424.18
8.2.140.0030.00624.66
8.2.130.0030.01026.16
8.2.120.0040.00421.11
8.2.110.0030.00722.13
8.2.100.0120.00017.71
8.2.90.0000.00819.22
8.2.80.0000.00719.32
8.2.70.0040.00417.50
8.2.60.0070.00317.80
8.2.50.0000.00818.07
8.2.40.0040.00418.22
8.2.30.0030.00619.45
8.2.20.0040.00417.62
8.2.10.0000.00717.77
8.2.00.0000.00717.63
8.1.270.0040.00423.99
8.1.260.0070.00026.35
8.1.250.0070.00028.09
8.1.240.0100.00023.81
8.1.230.0040.00718.88
8.1.220.0030.00517.78
8.1.210.0040.00418.77
8.1.200.0080.00017.35
8.1.190.0000.00817.63
8.1.180.0000.00819.13
8.1.170.0060.00318.52
8.1.160.0040.00420.70
8.1.150.0080.00018.68
8.1.140.0040.00417.36
8.1.130.0000.00617.94
8.1.120.0000.00717.46
8.1.110.0050.00317.43
8.1.100.0050.00217.55
8.1.90.0050.00317.46
8.1.80.0000.00717.50
8.1.70.0000.00717.36
8.1.60.0000.00817.61
8.1.50.0000.00717.53
8.1.40.0080.00017.57
8.1.30.0050.00317.57
8.1.20.0030.00617.68
8.1.10.0080.00017.49
8.1.00.0040.00417.35
8.0.300.0060.00318.77
8.0.290.0070.00017.05
8.0.280.0030.00318.45
8.0.270.0030.00317.27
8.0.260.0000.00616.82
8.0.250.0030.00316.91
8.0.240.0030.00617.06
8.0.230.0040.00417.09
8.0.220.0050.00216.85
8.0.210.0070.00017.01
8.0.200.0030.00316.89
8.0.190.0040.00417.05
8.0.180.0070.00016.91
8.0.170.0070.00016.88
8.0.160.0000.00816.99
8.0.150.0030.00616.97
8.0.140.0000.00816.86
8.0.130.0080.00013.32
8.0.120.0000.00816.87
8.0.110.0040.00416.88
8.0.100.0040.00416.95
8.0.90.0000.00716.89
8.0.80.0070.01416.94
8.0.70.0070.00016.82
8.0.60.0000.00816.96
8.0.50.0030.00516.81
8.0.30.0100.01017.24
8.0.20.0100.01117.40
8.0.10.0000.00716.96
8.0.00.0090.00916.75
7.4.330.0050.00015.00
7.4.320.0030.00316.55
7.4.300.0000.00616.45
7.4.290.0000.00716.57
7.4.280.0030.00316.43
7.4.270.0000.00716.50
7.4.260.0060.00013.27
7.4.250.0040.00416.61
7.4.240.0010.00616.50
7.4.230.0000.00716.44
7.4.220.0100.01016.59
7.4.210.0080.00616.65
7.4.200.0070.00016.63
7.4.190.0000.00716.77
7.4.160.0150.00016.37
7.4.150.0120.00617.40
7.4.140.0120.00717.86
7.4.130.0080.01216.50
7.4.120.0120.00516.53
7.4.110.0090.00616.52
7.4.100.0100.00616.52
7.4.90.0060.01016.62
7.4.80.0060.01219.39
7.4.70.0140.00316.57
7.4.60.0060.00916.53
7.4.50.0040.00416.15
7.4.40.0110.00222.77
7.4.30.0080.00916.51
7.4.00.0090.00614.87
7.3.330.0000.00513.32
7.3.320.0020.00213.31
7.3.310.0000.00716.39
7.3.300.0060.00016.36
7.3.290.0000.01516.35
7.3.280.0080.00916.38
7.3.270.0090.00817.40
7.3.260.0120.00816.51
7.3.250.0130.00416.37
7.3.240.0150.00316.28
7.3.230.0060.01416.39
7.3.210.0090.01216.61
7.3.200.0060.01519.39
7.3.190.0090.01416.64
7.3.180.0040.01116.27
7.3.170.0210.00316.41
7.3.160.0150.00016.48
7.3.120.0040.01117.15
7.3.110.0070.00417.15
7.3.100.0030.00817.15
7.3.90.0060.00317.15
7.3.80.0000.01017.15
7.3.70.0030.00917.15
7.3.60.0060.00317.15
7.3.50.0040.00817.15
7.3.40.0070.01017.15
7.3.30.0030.01017.15
7.3.20.0080.00617.15
7.3.10.0100.00717.15
7.3.00.0060.01017.15
7.2.330.0110.00716.88
7.2.320.0210.01316.75
7.2.310.0190.00316.76
7.2.300.0080.00916.70
7.2.290.0090.00916.60
7.2.240.0100.00717.15
7.2.230.0070.00717.15
7.2.220.0040.00817.15
7.2.210.0080.00417.15
7.2.200.0070.00417.15
7.2.190.0070.00417.15
7.2.180.0060.00617.15
7.2.170.0040.01117.15
7.2.160.0030.01017.15
7.2.150.0000.01017.15
7.2.140.0090.00317.15
7.2.130.0060.00917.15
7.2.120.0070.00717.15
7.2.110.0030.01317.15
7.2.100.0000.01017.15
7.2.90.0070.00717.15
7.2.80.0080.00717.15
7.2.70.0040.00717.15
7.2.60.0030.01017.15
7.2.50.0060.00617.15
7.2.40.0030.00717.15
7.2.30.0040.01217.15
7.2.20.0030.01417.15
7.2.10.0040.01217.15
7.2.00.0060.00918.28
7.1.330.0060.00917.15
7.1.320.0040.00717.15
7.1.310.0040.00817.15
7.1.300.0040.01117.15
7.1.290.0100.00317.15
7.1.280.0060.00617.15
7.1.270.0100.00017.15
7.1.260.0040.00817.15
7.1.250.0060.00617.15
7.1.100.0000.01018.14
7.1.70.0020.00517.26
7.1.60.0100.01319.32
7.1.50.0070.01416.92
7.1.00.0030.07022.28
7.0.200.0030.00716.94
7.0.140.0000.07722.06
7.0.100.0200.04719.93
7.0.90.0270.07719.85
7.0.80.0170.07019.80
7.0.70.0030.08719.88
7.0.60.0330.08020.02
7.0.50.0200.06020.26
7.0.40.0100.07320.11
7.0.30.0170.06720.05
7.0.20.0100.07320.10
7.0.10.0100.08719.99
7.0.00.0100.08319.91
5.6.280.0070.07020.86
5.6.250.0030.08720.67
5.6.240.0100.07320.62
5.6.230.0070.08320.67
5.6.220.0200.07320.60
5.6.210.0030.08720.56
5.6.200.0230.07321.03
5.6.190.0100.04721.04
5.6.180.0070.08021.08
5.6.170.0100.08321.07
5.6.160.0000.05721.06
5.6.150.0030.09321.04
5.6.140.0000.07721.13
5.6.130.0030.08321.05
5.6.120.0030.09320.98
5.6.110.0000.09721.03
5.6.100.0030.04320.95
5.6.90.0070.04021.05
5.6.80.0070.03720.49
5.6.70.0070.03720.54
5.6.60.0100.03020.45
5.6.50.0100.03320.49
5.6.40.0000.04320.43
5.6.30.0070.04020.38
5.6.20.0000.04320.38
5.6.10.0030.04020.42
5.6.00.0070.04020.35
5.5.380.0130.07320.35
5.5.370.0070.08320.30
5.5.360.0030.08320.31
5.5.350.0000.09020.36
5.5.340.0070.08320.84
5.5.330.0100.04320.89
5.5.320.0130.04020.85
5.5.310.0030.09020.92
5.5.300.0130.07020.89
5.5.290.0070.07020.83
5.5.280.0030.09720.83
5.5.270.0100.04720.64
5.5.260.0100.04320.64
5.5.250.0100.03720.70
5.5.240.0170.03020.04
5.5.230.0000.04320.22
5.5.220.0030.04320.30
5.5.210.0070.03720.24
5.5.200.0130.03020.20
5.5.190.0070.03720.10
5.5.180.0030.04020.24
5.5.160.0100.03320.10
5.5.150.0100.03320.14
5.5.140.0070.03720.14
5.5.130.0030.04020.09
5.5.120.0030.04320.25
5.5.110.0000.04020.16
5.5.100.0030.06019.96
5.5.90.0000.04720.17
5.5.80.0000.04320.02
5.5.70.0100.04020.00
5.5.60.0070.03720.16
5.5.50.0070.03720.11
5.5.40.0100.04020.00
5.5.30.0030.04020.15
5.5.20.0000.04320.08
5.5.10.0070.03720.09
5.5.00.0070.04020.08
5.4.450.0100.05719.28
5.4.440.0030.08019.53
5.4.430.0070.06719.44
5.4.420.0100.03319.35
5.4.410.0100.03319.04
5.4.400.0030.04018.91
5.4.390.0100.03019.03
5.4.380.0070.04019.23
5.4.370.0030.03718.95
5.4.360.0070.03719.18
5.4.350.0000.04019.12
5.4.340.0100.03318.82
5.4.320.0000.04718.98
5.4.310.0100.03018.94
5.4.300.0000.03719.09
5.4.290.0030.04019.12
5.4.280.0070.03319.04
5.4.270.0030.04019.12
5.4.260.0030.05719.23
5.4.250.0030.03719.03
5.4.240.0070.03719.18
5.4.230.0030.03719.13
5.4.220.0000.04719.04
5.4.210.0030.05019.15
5.4.200.0130.03018.94
5.4.190.0070.04719.19
5.4.180.0070.03319.21
5.4.170.0000.04019.11
5.4.160.0030.04019.21
5.4.150.0070.03719.11
5.4.140.0000.04016.28
5.4.130.0070.03316.43
5.4.120.0030.04316.40
5.4.110.0070.03716.39
5.4.100.0030.07316.39
5.4.90.0000.07316.51
5.4.80.0100.06316.43
5.4.70.0100.06316.45
5.4.60.0030.06016.45
5.4.50.0070.06316.31
5.4.40.0130.06016.45
5.4.30.0030.08016.46
5.4.20.0030.07716.29
5.4.10.0070.06016.31
5.4.00.0070.05715.72
5.3.290.0000.04314.81
5.3.280.0000.04014.61
5.3.270.0000.04014.66
5.3.260.0030.05014.67
5.3.250.0030.05314.71
5.3.240.0000.03714.55
5.3.230.0070.03314.60
5.3.220.0030.03314.49
5.3.210.0030.03714.71
5.3.200.0100.06014.60
5.3.190.0030.07714.49
5.3.180.0070.06314.68
5.3.170.0000.07714.54
5.3.160.0030.07714.68
5.3.150.0030.04014.50
5.3.140.0030.06714.65
5.3.130.0130.05714.54
5.3.120.0030.08014.48
5.3.110.0100.07014.53
5.3.100.0000.08014.16
5.3.90.0130.05714.13
5.3.80.0030.08014.13
5.3.70.0070.07014.08
5.3.60.0100.05014.01
5.3.50.0100.07313.97
5.3.40.0030.05714.01
5.3.30.0100.03713.80
5.3.20.0070.06313.71
5.3.10.0070.07313.64
5.3.00.0100.06713.69
5.2.170.0030.06011.00
5.2.160.0070.03011.21
5.2.150.0130.03311.10
5.2.140.0070.05011.18
5.2.130.0000.06310.94
5.2.120.0070.06011.16
5.2.110.0070.03011.05
5.2.100.0070.05311.09
5.2.90.0100.05710.92
5.2.80.0030.05311.09
5.2.70.0030.03010.89
5.2.60.0100.03310.84
5.2.50.0100.05311.04
5.2.40.0070.06010.98
5.2.30.0070.04011.02
5.2.20.0130.04310.95
5.2.10.0070.05010.71
5.2.00.0130.05310.71
5.1.60.0100.05010.04
5.1.50.0070.0509.82
5.1.40.0130.0439.98
5.1.30.0070.05710.36
5.1.20.0030.04310.27
5.1.10.0100.05010.11
5.1.00.0070.03310.05
5.0.50.0030.0309.49
5.0.40.0070.0439.49
5.0.30.0030.0339.49
5.0.20.0030.0479.49
5.0.10.0000.0409.49
5.0.00.0170.0479.49
4.4.90.0000.0179.49
4.4.80.0030.0279.49
4.4.70.0030.0339.49
4.4.60.0000.0239.49
4.4.50.0000.0379.49
4.4.40.0000.0579.49
4.4.30.0000.0209.49
4.4.20.0070.0239.49
4.4.10.0000.0239.49
4.4.00.0070.0309.49
4.3.110.0000.0179.49
4.3.100.0030.0209.49
4.3.90.0000.0309.49
4.3.80.0070.0439.49
4.3.70.0100.0209.49
4.3.60.0030.0239.49
4.3.50.0030.0339.49
4.3.40.0030.0309.49
4.3.30.0030.0339.49
4.3.20.0000.0379.49
4.3.10.0000.0209.49
4.3.00.0030.0339.49

preferences:
40.38 ms | 400 KiB | 5 Q