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 silly silly 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.70.0150.00616.75
8.3.60.0110.00418.41
8.3.50.0050.01021.02
8.3.40.0130.00318.54
8.3.30.0000.01420.35
8.3.20.0050.00520.01
8.3.10.0040.00421.89
8.3.00.0050.00322.34
8.2.180.0090.00616.75
8.2.170.0080.00822.96
8.2.160.0070.00722.13
8.2.150.0050.00324.18
8.2.140.0080.00024.66
8.2.130.0030.00526.16
8.2.120.0000.00720.95
8.2.110.0040.00422.14
8.2.100.0060.00617.91
8.2.90.0040.00419.28
8.2.80.0000.00819.38
8.2.70.0040.00417.63
8.2.60.0040.00417.93
8.2.50.0000.00818.07
8.2.40.0040.00418.16
8.2.30.0030.00719.34
8.2.20.0040.00417.68
8.2.10.0040.00417.84
8.2.00.0040.00417.76
8.1.280.0110.00425.92
8.1.270.0000.00723.99
8.1.260.0040.00426.35
8.1.250.0000.00728.09
8.1.240.0030.00623.99
8.1.230.0070.00419.01
8.1.220.0040.00417.79
8.1.210.0030.00618.77
8.1.200.0090.00017.38
8.1.190.0000.00917.53
8.1.180.0000.00818.10
8.1.170.0040.00418.72
8.1.160.0070.00020.59
8.1.150.0000.00718.61
8.1.140.0040.00417.52
8.1.130.0030.00317.72
8.1.120.0040.00417.50
8.1.110.0040.00417.35
8.1.100.0030.00517.47
8.1.90.0000.00817.36
8.1.80.0000.00817.38
8.1.70.0000.00817.46
8.1.60.0030.00517.62
8.1.50.0060.00317.57
8.1.40.0000.00717.54
8.1.30.0000.00817.55
8.1.20.0040.00417.65
8.1.10.0000.00717.46
8.1.00.0060.00317.40
8.0.300.0040.00418.77
8.0.290.0030.00617.18
8.0.280.0050.00318.47
8.0.270.0000.00717.30
8.0.260.0030.00316.94
8.0.250.0000.00716.95
8.0.240.0040.00416.91
8.0.230.0070.00016.94
8.0.220.0000.00716.99
8.0.210.0000.00716.91
8.0.200.0030.00317.05
8.0.190.0040.00416.96
8.0.180.0070.00016.96
8.0.170.0020.00517.06
8.0.160.0020.00517.05
8.0.150.0050.00216.90
8.0.140.0000.00816.99
8.0.130.0050.00313.41
8.0.120.0000.00916.83
8.0.110.0000.00716.99
8.0.100.0040.00416.99
8.0.90.0070.00016.85
8.0.80.0030.01317.02
8.0.70.0040.00416.79
8.0.60.0050.00516.82
8.0.50.0040.00416.81
8.0.30.0070.01116.99
8.0.20.0090.00917.41
8.0.10.0000.00716.95
8.0.00.0130.00716.82
7.4.330.0050.00015.00
7.4.320.0060.00016.57
7.4.300.0030.00316.65
7.4.290.0070.00016.62
7.4.280.0030.00316.60
7.4.270.0040.00416.52
7.4.260.0030.00313.25
7.4.250.0030.00516.55
7.4.240.0040.00416.60
7.4.230.0000.00716.59
7.4.220.0040.01516.69
7.4.210.0070.00816.60
7.4.200.0070.00016.71
7.4.190.0070.00016.59
7.4.160.0160.00816.58
7.4.150.0070.01417.40
7.4.140.0100.00717.86
7.4.130.0110.00616.61
7.4.120.0120.00816.59
7.4.110.0130.00616.60
7.4.100.0100.00716.42
7.4.90.0110.00516.68
7.4.80.0140.00319.39
7.4.70.0130.00316.58
7.4.60.0120.00616.69
7.4.50.0020.00216.54
7.4.40.0090.00822.77
7.4.30.0040.01716.44
7.4.00.0110.00414.97
7.3.330.0000.00513.35
7.3.320.0000.00513.36
7.3.310.0050.00216.22
7.3.300.0000.00716.23
7.3.290.0060.00916.39
7.3.280.0080.00716.34
7.3.270.0100.00717.40
7.3.260.0100.00516.41
7.3.250.0110.00716.40
7.3.240.0090.01516.64
7.3.230.0100.00716.39
7.3.210.0150.00316.48
7.3.200.0070.01019.39
7.3.190.0040.01216.48
7.3.180.0030.01216.39
7.3.170.0090.00916.59
7.3.160.0100.00616.35
7.3.120.0060.00914.83
7.3.10.0100.00816.46
7.3.00.0100.01016.47
7.2.330.0060.01116.81
7.2.320.0150.00316.80
7.2.310.0170.00716.76
7.2.300.0080.00816.70
7.2.290.0100.00716.53
7.2.130.0120.00916.70
7.2.120.0100.01116.49
7.2.110.0130.00716.58
7.2.100.0080.01116.57
7.2.90.0100.01116.63
7.2.80.0090.00716.54
7.2.70.0090.00916.79
7.2.60.0160.00516.58
7.2.50.0080.01216.54
7.2.40.0120.00816.64
7.2.30.0090.00716.66
7.2.20.0080.00916.67
7.2.10.0080.00816.47
7.2.00.0100.00617.52
7.1.250.0120.00815.54
7.1.100.0030.01017.98
7.1.70.0040.00417.30
7.1.60.0090.01519.32
7.1.50.0090.00316.97
7.1.00.0070.03022.57
7.0.200.0040.00416.70
7.0.140.0100.09022.04
7.0.60.0170.08021.63
7.0.50.0100.08017.89
7.0.40.0070.04720.24
7.0.30.0330.07720.15
7.0.20.0200.03720.26
7.0.10.0100.08320.15
7.0.00.0000.07720.10
5.6.280.0030.07320.99
5.6.210.0100.06020.75
5.6.200.0070.03718.15
5.6.190.0100.07020.55
5.6.180.0400.04720.52
5.6.170.0270.07720.50
5.6.160.0100.07720.46
5.6.150.0070.08018.15
5.6.140.0130.07318.15
5.6.130.0070.05318.19
5.6.120.0000.04721.11
5.6.110.0000.04721.00
5.6.100.0170.07321.00
5.6.90.0200.04721.13
5.6.80.0100.06320.47
5.5.350.0100.08720.38
5.5.340.0130.07318.09
5.5.330.0100.08020.40
5.5.320.0500.04720.25
5.5.310.0300.07720.41
5.5.300.0070.07018.08
5.5.290.0000.06018.05
5.5.280.0170.07720.95
5.5.270.0100.07720.73
5.5.260.0100.08720.87
5.5.250.0170.06720.80
5.5.240.0100.06320.15
5.4.450.0200.05019.55
5.4.440.0270.07719.29
5.4.430.0270.04019.27
5.4.420.0170.03719.47
5.4.410.0170.04019.35
5.4.400.0400.04019.18
5.4.390.0100.04319.15
5.4.380.0170.03718.94
5.4.370.0130.08018.97
5.4.360.0270.05318.93
5.4.350.0230.04719.22
5.4.340.0170.04718.99
5.4.320.0270.07319.07
5.4.310.0270.04719.17
5.4.300.0200.05719.06
5.4.290.0200.05319.14
5.4.280.0200.04718.95
5.4.270.0230.04718.94
5.4.260.0230.07319.22
5.4.250.0200.05719.10
5.4.240.0300.06719.07
5.4.230.0300.06019.07
5.4.220.0170.04019.16
5.4.210.0100.06719.25
5.4.200.0230.08019.22
5.4.190.0270.05019.10
5.4.180.0230.07019.18
5.4.170.0300.07018.92
5.4.160.0330.04719.18
5.4.150.0230.07018.98
5.4.140.0230.04716.45
5.4.130.0170.06016.29
5.4.120.0300.04016.23
5.4.110.0230.03716.26
5.4.100.0230.03716.44
5.4.90.0170.05316.37
5.4.80.0200.05716.46
5.4.70.0230.04316.43
5.4.60.0270.05316.50
5.4.50.0170.04716.53
5.4.40.0170.05716.30
5.4.30.0270.05716.48
5.4.20.0070.05716.19
5.4.10.0330.05316.22
5.4.00.0270.05315.72
5.3.290.0300.06014.67
5.3.280.0170.05014.48
5.3.270.0230.06714.61
5.3.260.0200.06714.60
5.3.250.0370.06014.77
5.3.240.0170.06714.75
5.3.230.0200.07314.52
5.3.220.0400.05714.63
5.3.210.0200.07314.57
5.3.200.0200.07314.58
5.3.190.0230.06714.57
5.3.180.0200.05714.60
5.3.170.0200.05014.72
5.3.160.0170.04314.62
5.3.150.0130.04314.59
5.3.140.0300.03714.44
5.3.130.0170.05314.61
5.3.120.0270.04714.55
5.3.110.0230.03714.70
5.3.100.0300.07014.10
5.3.90.0270.04014.07
5.3.80.0230.06013.98
5.3.70.0100.05314.02
5.3.60.0170.04714.04
5.3.50.0270.06313.83
5.3.40.0300.06014.00
5.3.30.0230.05313.91
5.3.20.0200.03313.69
5.3.10.0200.03013.71
5.3.00.0130.03713.59
5.2.170.0170.06011.09
5.2.160.0170.05310.99
5.2.150.0200.04011.13
5.2.140.0100.05711.08
5.2.130.0200.02711.08
5.2.120.0100.03011.04
5.2.110.0100.03011.03
5.2.100.0170.02311.00
5.2.90.0100.02711.07
5.2.80.0030.03710.98
5.2.70.0170.02710.91
5.2.60.0130.02711.20
5.2.50.0100.03010.91
5.2.40.0070.03010.97
5.2.30.0130.02710.85
5.2.20.0100.05311.11
5.2.10.0130.05010.87
5.2.00.0170.02010.75
5.1.60.0100.05310.14
5.1.50.0130.0509.94
5.1.40.0100.02310.05
5.1.30.0130.05310.39
5.1.20.0130.02310.36
5.1.10.0130.03710.04
5.1.00.0100.02710.14
5.0.50.0030.0238.63
5.0.40.0000.0238.63
5.0.30.0100.0238.63
5.0.20.0030.0208.63
5.0.10.0070.0208.63
5.0.00.0030.0308.63
4.4.90.0000.0178.63
4.4.80.0030.0178.63
4.4.70.0100.0308.63
4.4.60.0070.0208.63
4.4.50.0070.0278.63
4.4.40.0070.0238.63
4.4.30.0030.0208.63
4.4.20.0030.0238.63
4.4.10.0100.0238.63
4.4.00.0070.0238.63
4.3.110.0070.0138.63
4.3.100.0030.0238.63
4.3.90.0070.0138.63
4.3.80.0030.0278.63
4.3.70.0000.0178.63
4.3.60.0070.0138.63
4.3.50.0030.0178.63
4.3.40.0030.0238.63
4.3.30.0000.0208.63
4.3.20.0030.0138.63
4.3.10.0000.0178.63
4.3.00.0000.0178.63

preferences:
61.43 ms | 401 KiB | 5 Q