3v4l.org

run code in 300+ PHP versions simultaneously
<?php //this code will append a &mobileapp to every 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

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.0110.01118.57
8.3.50.0110.00521.20
8.3.40.0070.01018.71
8.3.30.0070.00720.34
8.3.20.0040.00420.20
8.3.10.0080.00022.05
8.3.00.0070.00022.52
8.2.180.0150.00016.63
8.2.170.0070.00722.96
8.2.160.0100.00722.26
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0000.00721.13
8.2.110.0030.00522.07
8.2.100.0070.00417.72
8.2.90.0040.00419.22
8.2.80.0050.00319.20
8.2.70.0030.00517.50
8.2.60.0000.01017.90
8.2.50.0040.00418.07
8.2.40.0000.00818.34
8.2.30.0050.00319.45
8.2.20.0040.00417.54
8.2.10.0040.00417.76
8.2.00.0000.00817.66
8.1.280.0100.00325.92
8.1.270.0070.00023.99
8.1.260.0000.00926.35
8.1.250.0020.00528.09
8.1.240.0000.00924.00
8.1.230.0100.00318.98
8.1.220.0030.00517.74
8.1.210.0060.00318.77
8.1.200.0090.00017.35
8.1.190.0030.00517.41
8.1.180.0040.00419.01
8.1.170.0080.00018.48
8.1.160.0070.00020.72
8.1.150.0000.00818.64
8.1.140.0040.00417.32
8.1.130.0000.00717.78
8.1.120.0070.00017.37
8.1.110.0060.00317.48
8.1.100.0050.00317.36
8.1.90.0070.00017.48
8.1.80.0070.00017.32
8.1.70.0030.00317.36
8.1.60.0080.00017.57
8.1.50.0040.00417.42
8.1.40.0070.00017.51
8.1.30.0030.00617.59
8.1.20.0040.00417.70
8.1.10.0000.00717.51
8.1.00.0000.00817.43
8.0.300.0040.00418.77
8.0.290.0070.00017.16
8.0.280.0050.00218.44
8.0.270.0030.00317.16
8.0.260.0000.00616.76
8.0.250.0000.00717.04
8.0.240.0050.00317.03
8.0.230.0030.00317.00
8.0.220.0040.00416.96
8.0.210.0040.00416.88
8.0.200.0030.00317.01
8.0.190.0070.00016.94
8.0.180.0050.00317.00
8.0.170.0050.00316.95
8.0.160.0040.00416.89
8.0.150.0000.00716.78
8.0.140.0000.00716.89
8.0.130.0000.00713.40
8.0.120.0030.00516.80
8.0.110.0080.00016.93
8.0.100.0030.00516.84
8.0.90.0030.00416.99
8.0.80.0060.00916.97
8.0.70.0070.00016.84
8.0.60.0000.00817.02
8.0.50.0040.00416.98
8.0.30.0090.00916.92
8.0.20.0140.00817.40
8.0.10.0000.00716.93
8.0.00.0100.00916.85
7.4.330.0000.00615.00
7.4.320.0040.00416.61
7.4.300.0000.00716.59
7.4.290.0030.00316.56
7.4.280.0000.00716.52
7.4.270.0030.00316.64
7.4.260.0000.00713.21
7.4.250.0040.00416.45
7.4.240.0030.00316.54
7.4.230.0030.00316.41
7.4.220.0130.01016.51
7.4.210.0070.00916.62
7.4.200.0030.00316.39
7.4.190.0030.00516.75
7.4.160.0040.01216.76
7.4.150.0150.00317.40
7.4.140.0070.01217.86
7.4.130.0140.00316.63
7.4.120.0050.01116.61
7.4.110.0130.00316.68
7.4.100.0140.00416.59
7.4.90.0140.00416.56
7.4.80.0070.01019.39
7.4.70.0120.00916.38
7.4.60.0130.00316.50
7.4.50.0030.00516.62
7.4.40.0030.01322.77
7.4.30.0060.01216.52
7.4.00.0030.00915.05
7.3.330.0030.00313.23
7.3.320.0050.00013.34
7.3.310.0000.00716.23
7.3.300.0000.00716.37
7.3.290.0090.00616.41
7.3.280.0090.00616.36
7.3.270.0130.00317.40
7.3.260.0170.00016.63
7.3.250.0050.01216.49
7.3.240.0100.00716.59
7.3.230.0060.01116.44
7.3.210.0180.00016.29
7.3.200.0100.00619.39
7.3.190.0120.00416.44
7.3.180.0090.00616.26
7.3.170.0060.00916.28
7.3.160.0070.01016.36
7.3.120.0030.01214.88
7.2.330.0070.01016.52
7.2.320.0070.01316.71
7.2.310.0130.00616.66
7.2.300.0100.00616.36
7.2.290.0090.00916.43
7.2.00.0000.01519.41
7.1.100.0000.01118.11
7.1.70.0040.00417.03
7.1.60.0100.01019.32
7.1.50.0120.00616.48
7.1.00.0030.04322.51
7.0.200.0040.00416.86
7.0.140.0000.07322.12
7.0.100.0430.04020.18
7.0.90.0070.07319.90
7.0.80.0300.08319.93
7.0.70.0530.08720.14
7.0.60.0600.04020.00
7.0.50.0570.07720.28
7.0.40.0200.07320.05
7.0.30.0030.08320.04
7.0.20.0130.07020.10
7.0.10.0100.07320.09
7.0.00.0070.08720.18
5.6.280.0030.07721.02
5.6.250.0030.04020.79
5.6.240.0030.07720.64
5.6.230.0130.07020.76
5.6.220.0070.04720.65
5.6.210.0070.08020.67
5.6.200.0100.08320.96
5.6.190.0070.08721.14
5.6.180.0070.08321.09
5.6.170.0130.07721.04
5.6.160.0030.07321.11
5.6.150.0070.08021.00
5.6.140.0070.08721.06
5.6.130.0030.08720.93
5.6.120.0070.08021.08
5.6.110.0100.05321.03
5.6.100.0170.04321.00
5.6.90.0030.07721.09
5.6.80.0100.07720.33
5.6.70.0100.05020.44
5.6.60.0200.06720.54
5.6.50.0030.07320.44
5.6.40.0070.08020.46
5.6.30.0070.05720.47
5.6.20.0100.05320.41
5.6.10.0100.07320.38
5.6.00.0100.07020.37
5.5.380.0070.04020.36
5.5.370.0100.07020.40
5.5.360.0070.08320.39
5.5.350.0070.04720.39
5.5.340.0030.08720.84
5.5.330.0130.07320.84
5.5.320.0100.08320.89
5.5.310.0030.08720.89
5.5.300.0030.08020.91
5.5.290.0100.07720.88
5.5.280.0030.09320.84
5.5.270.0100.05320.86
5.5.260.0100.07720.77
5.5.250.0070.08320.70
5.5.240.0200.06320.23
5.5.230.0100.04320.30
5.5.220.0070.06720.11
5.5.210.0100.05320.30
5.5.200.0070.07720.17
5.5.190.0100.07720.24
5.5.180.0070.08020.08
5.5.160.0170.07020.26
5.5.150.0130.07020.19
5.5.140.0100.07320.23
5.5.130.0070.07720.27
5.5.120.0070.06720.22
5.5.110.0070.08320.14
5.5.100.0030.04720.17
5.5.90.0100.07319.94
5.5.80.0130.05320.11
5.5.70.0000.05020.09
5.5.60.0100.07320.16
5.5.50.0170.06020.05
5.5.40.0130.07319.97
5.5.30.0130.07020.12
5.5.20.0130.04720.09
5.5.10.0170.07020.11
5.5.00.0070.07020.04
5.4.450.0070.04319.43
5.4.440.0130.04319.18
5.4.430.0070.08019.18
5.4.420.0100.07319.37
5.4.410.0070.08019.10
5.4.400.0070.08019.23
5.4.390.0100.07719.21
5.4.380.0030.08019.10
5.4.370.0100.07319.17
5.4.360.0070.07319.09
5.4.350.0030.07318.90
5.4.340.0100.07319.21
5.4.320.0070.07319.04
5.4.310.0030.07719.18
5.4.300.0030.08019.04
5.4.290.0130.03719.23
5.4.280.0030.08019.04
5.4.270.0030.05719.18
5.4.260.0100.07019.18
5.4.250.0070.04719.12
5.4.240.0070.04319.19
5.4.230.0100.06019.18
5.4.220.0070.08019.18
5.4.210.0170.06318.89
5.4.200.0000.08319.04
5.4.190.0030.05019.03
5.4.180.0130.06319.12
5.4.170.0070.07719.12
5.4.160.0070.08018.83
5.4.150.0000.08719.11
5.4.140.0070.04716.20
5.4.130.0100.07016.38
5.4.120.0000.07316.40
5.4.110.0100.06016.33
5.4.100.0130.06316.50
5.4.90.0030.07016.50
5.4.80.0030.06316.42
5.4.70.0100.06716.46
5.4.60.0070.07316.49
5.4.50.0030.04016.31
5.4.40.0030.07316.29
5.4.30.0070.05716.24
5.4.20.0070.07016.46
5.4.10.0070.07016.48
5.4.00.0070.06715.83
5.3.290.0070.05314.72
5.3.280.0030.07714.52
5.3.270.0130.06714.72
5.3.260.0070.07014.59
5.3.250.0030.07314.66
5.3.240.0000.08014.56
5.3.230.0030.07014.54
5.3.220.0000.08014.51
5.3.210.0030.08314.52
5.3.200.0000.07314.70
5.3.190.0070.07314.69
5.3.180.0000.08314.63
5.3.170.0000.07714.69
5.3.160.0030.07714.63
5.3.150.0030.07314.54
5.3.140.0070.07314.54
5.3.130.0070.07014.54
5.3.120.0100.07014.56
5.3.110.0100.06714.58
5.3.100.0070.07313.98
5.3.90.0100.07013.98
5.3.80.0000.06014.09
5.3.70.0100.06713.95
5.3.60.0070.06713.94
5.3.50.0070.07714.04
5.3.40.0070.06313.86
5.3.30.0070.07313.94
5.3.20.0030.06313.70
5.3.10.0100.06713.73
5.3.00.0200.06313.63
5.2.170.0100.05711.32
5.2.160.0030.06311.32
5.2.150.0170.04711.32
5.2.140.0000.06711.32
5.2.130.0100.05311.32
5.2.120.0030.06311.32
5.2.110.0070.06011.32
5.2.100.0070.05711.32
5.2.90.0030.06711.32
5.2.80.0100.05311.32
5.2.70.0070.05311.32
5.2.60.0030.06011.32
5.2.50.0070.06011.32
5.2.40.0100.05311.32
5.2.30.0030.06711.32
5.2.20.0030.06311.32
5.2.10.0070.05711.32
5.2.00.0030.06311.32
5.1.60.0030.05311.32
5.1.50.0030.05711.32
5.1.40.0000.04011.32
5.1.30.0000.04711.32
5.1.20.0070.02311.32
5.1.10.0070.03711.32
5.1.00.0070.02311.32
5.0.50.0000.04011.32
5.0.40.0000.03011.32
5.0.30.0000.05711.32
5.0.20.0000.03011.32
5.0.10.0030.04311.32
5.0.00.0100.02311.32
4.4.90.0030.03711.32
4.4.80.0030.03311.32
4.4.70.0030.03311.32
4.4.60.0000.02711.32
4.4.50.0000.04011.32
4.4.40.0030.05311.32
4.4.30.0000.03711.32
4.4.20.0030.03311.32
4.4.10.0030.02011.32
4.4.00.0030.05311.32
4.3.110.0000.03311.32
4.3.100.0000.02311.32
4.3.90.0000.03311.32
4.3.80.0000.04711.32
4.3.70.0030.02311.32
4.3.60.0000.02011.32
4.3.50.0030.03311.32
4.3.40.0000.02711.32
4.3.30.0000.03711.32
4.3.20.0030.02711.32
4.3.10.0000.03311.32
4.3.00.0000.03311.32

preferences:
43.16 ms | 401 KiB | 5 Q