3v4l.org

run code in 300+ PHP versions simultaneously
<?php function comment_retrieve($amount = 0, $username = null, $file = null) { if ($file) { if ($username) { $querystring_file = ' AND fc_forfile=\'' . $file . '\''; } else { $querystring_file = ' WHERE fc_forfile=\'' . $file . '\''; } } else { $querystring_file = ''; } if ($username) { $querystring_username = ' WHERE fc_byuser=\'' . $username . '\''; } else { $querystring_username = ''; } if ($amount > 0) { $querystring_amount = ' LIMIT ' . $amount; } else { $querystring_amount = ''; } // query $querystring = "SELECT * FROM file_comments" . $querystring_username . $querystring_file . $querystring_amount; return $querystring; } echo comment_retrieve(0,'bob',0);

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.0140.00718.27
8.3.50.0200.01021.14
8.3.40.0150.00018.85
8.3.30.0080.00520.26
8.3.20.0070.00020.38
8.3.10.0040.00421.92
8.3.00.0000.00822.58
8.2.180.0090.01216.50
8.2.170.0000.01422.96
8.2.160.0040.01122.13
8.2.150.0060.00324.18
8.2.140.0060.00324.66
8.2.130.0000.00826.16
8.2.120.0040.00420.77
8.2.110.0040.00422.21
8.2.100.0080.00417.72
8.2.90.0000.00819.12
8.2.80.0080.00019.46
8.2.70.0030.00617.63
8.2.60.0040.00418.03
8.2.50.0040.00418.07
8.2.40.0000.00819.88
8.2.30.0050.00319.38
8.2.20.0000.00917.64
8.2.10.0030.00517.62
8.2.00.0030.00517.80
8.1.280.0070.00725.92
8.1.270.0080.00023.99
8.1.260.0040.00426.35
8.1.250.0050.00328.09
8.1.240.0090.00023.77
8.1.230.0070.00319.16
8.1.220.0040.00417.74
8.1.210.0030.00618.77
8.1.200.0090.00017.22
8.1.190.0040.00417.43
8.1.180.0000.00819.01
8.1.170.0040.00418.46
8.1.160.0000.01018.79
8.1.150.0050.00218.70
8.1.140.0030.00517.40
8.1.130.0000.00717.82
8.1.120.0040.00417.46
8.1.110.0000.00717.40
8.1.100.0080.00017.41
8.1.90.0000.00717.48
8.1.80.0000.00717.45
8.1.70.0000.00717.40
8.1.60.0050.00317.41
8.1.50.0000.00817.41
8.1.40.0000.00817.53
8.1.30.0050.00317.54
8.1.20.0000.00817.65
8.1.10.0070.00017.59
8.1.00.0000.00717.34
8.0.300.0050.00218.77
8.0.290.0070.00017.18
8.0.280.0000.00718.39
8.0.270.0070.00017.19
8.0.260.0060.00016.70
8.0.250.0040.00416.93
8.0.240.0030.00516.84
8.0.230.0030.00316.85
8.0.220.0030.00316.93
8.0.210.0000.00716.79
8.0.200.0040.00416.97
8.0.190.0000.00816.98
8.0.180.0040.00416.95
8.0.170.0000.00916.89
8.0.160.0030.00316.92
8.0.150.0000.00716.86
8.0.140.0000.00816.84
8.0.130.0000.00513.36
8.0.120.0060.00316.74
8.0.110.0040.00416.90
8.0.100.0000.00816.74
8.0.90.0040.00416.93
8.0.80.0000.01516.85
8.0.70.0040.00416.71
8.0.60.0040.00416.88
8.0.50.0040.00416.95
8.0.30.0110.00916.87
8.0.20.0130.00817.40
8.0.10.0000.00816.82
8.0.00.0100.00816.62
7.4.330.0040.00015.10
7.4.320.0040.00416.59
7.4.300.0000.00616.43
7.4.290.0000.00716.61
7.4.280.0030.00316.54
7.4.270.0060.00316.53
7.4.260.0030.00313.33
7.4.250.0030.00416.46
7.4.240.0030.00316.56
7.4.230.0030.00316.49
7.4.220.0060.01116.58
7.4.210.0110.00616.56
7.4.200.0070.00016.63
7.4.190.0000.00716.64
7.4.160.0080.00816.42
7.4.150.0100.00717.40
7.4.140.0100.00817.86
7.4.130.0090.01216.36
7.4.120.0100.00816.61
7.4.110.0040.01616.46
7.4.100.0100.00616.54
7.4.90.0090.00916.36
7.4.80.0030.01819.39
7.4.70.0160.00016.46
7.4.60.0110.01116.52
7.4.50.0040.00416.29
7.4.40.0060.00922.77
7.4.30.0110.00716.42
7.4.00.0030.00914.89
7.3.330.0000.00613.09
7.3.320.0000.00613.33
7.3.310.0040.00416.13
7.3.300.0000.00716.33
7.3.290.0060.01116.30
7.3.280.0080.01116.31
7.3.270.0090.00617.40
7.3.260.0100.01016.52
7.3.250.0090.00916.45
7.3.240.0100.00616.58
7.3.230.0130.00316.39
7.3.210.0100.00716.73
7.3.200.0120.00619.39
7.3.190.0070.01416.43
7.3.180.0080.00816.31
7.3.170.0050.01116.47
7.3.160.0060.01016.45
7.3.120.0030.01114.79
7.3.10.0220.00316.86
7.3.00.0330.00616.28
7.2.330.0140.00416.45
7.2.320.0090.01316.82
7.2.310.0110.01116.71
7.2.300.0100.00716.80
7.2.290.0090.00816.50
7.2.130.0090.00316.73
7.2.120.0110.00016.30
7.2.110.0210.00316.40
7.2.100.0060.01616.75
7.2.90.0320.00616.54
7.2.80.0250.01116.77
7.2.70.0350.00716.68
7.2.60.0440.01016.67
7.2.50.0230.00716.92
7.2.40.0250.00416.80
7.2.30.0140.00416.79
7.2.20.0100.00716.61
7.2.10.0060.00616.75
7.2.00.0080.00518.15
7.1.250.0070.01115.63
7.1.100.0070.00718.05
7.1.70.0040.00417.21
7.1.60.0100.01019.21
7.1.50.0140.01016.99
7.1.00.0030.07722.54
7.0.200.0200.00714.69
7.0.140.0030.07321.96
7.0.80.0030.04719.86
7.0.70.0300.05720.13
7.0.60.0570.07719.96
7.0.50.0000.05320.32
7.0.40.0070.05019.95
7.0.30.0100.06720.11
7.0.20.0070.05320.12
7.0.10.0130.07720.04
7.0.00.0100.08320.03
5.6.280.0070.07021.11
5.6.230.0130.05320.62
5.6.220.0200.06020.68
5.6.210.0070.04720.77
5.6.200.0170.06721.05
5.6.190.0100.07721.17
5.6.180.0000.08721.14
5.6.170.0170.06721.05
5.6.160.0170.04321.00
5.6.150.0030.08721.14
5.6.140.0130.07321.02
5.6.130.0170.07721.11
5.6.120.0130.07020.99
5.6.110.0100.07021.01
5.6.100.0000.07721.04
5.6.90.0130.03720.99
5.6.80.0130.04020.50
5.6.70.0000.08720.46
5.6.60.0070.08020.40
5.6.50.0130.07020.50
5.6.40.0070.03720.30
5.6.30.0070.03720.30
5.6.20.0070.04320.44
5.6.10.0070.04320.44
5.6.00.0000.04320.41
5.5.370.0070.08320.42
5.5.360.0070.04320.54
5.5.350.0100.08320.49
5.5.340.0130.07320.89
5.5.330.0100.04720.91
5.5.320.0070.03720.77
5.5.310.0100.04320.90
5.5.300.0130.08320.89
5.5.290.0070.06720.80
5.5.280.0030.08320.83
5.5.270.0000.08720.94
5.5.260.0030.09020.91
5.5.250.0070.07020.55
5.5.240.0100.06020.28
5.5.230.0100.07720.27
5.5.220.0130.06720.21
5.5.210.0100.07320.27
5.5.200.0030.04020.22
5.5.190.0070.03720.23
5.5.180.0070.04020.09
5.5.160.0000.04320.24
5.5.150.0000.04719.99
5.5.140.0000.04020.26
5.5.130.0030.04020.18
5.5.120.0170.02720.18
5.5.110.0070.03720.15
5.5.100.0030.04020.06
5.5.90.0030.04020.17
5.5.80.0030.04020.12
5.5.70.0030.04020.16
5.5.60.0030.05720.11
5.5.50.0100.07020.01
5.5.40.0130.03020.06
5.5.30.0030.04020.16
5.5.20.0030.04320.06
5.5.10.0000.05020.04
5.5.00.0070.04020.07
5.4.450.0000.07319.20
5.4.440.0100.04319.41
5.4.430.0130.05019.27
5.4.420.0130.05019.39
5.4.410.0100.05019.05
5.4.400.0030.04319.14
5.4.390.0100.06719.21
5.4.380.0100.04319.13
5.4.370.0130.07718.91
5.4.360.0000.05019.14
5.4.350.0030.04019.12
5.4.340.0100.03319.06
5.4.320.0000.04319.13
5.4.310.0030.04018.91
5.4.300.0100.03319.09
5.4.290.0170.02319.09
5.4.280.0030.04018.96
5.4.270.0000.04018.91
5.4.260.0030.03319.23
5.4.250.0030.03718.90
5.4.240.0030.05018.84
5.4.230.0000.05319.05
5.4.220.0100.03719.13
5.4.210.0000.05319.20
5.4.200.0070.03719.12
5.4.190.0000.04019.11
5.4.180.0030.03719.21
5.4.170.0030.04318.84
5.4.160.0070.03719.01
5.4.150.0070.07318.93
5.4.140.0000.04016.25
5.4.130.0000.04016.40
5.4.120.0100.03016.48
5.4.110.0000.03716.43
5.4.100.0030.03016.34
5.4.90.0000.03716.46
5.4.80.0030.03016.35
5.4.70.0100.02716.32
5.4.60.0070.02716.44
5.4.50.0000.04316.41
5.4.40.0070.06316.52
5.4.30.0100.03316.33
5.4.20.0070.02716.57
5.4.10.0030.03016.47
5.4.00.0030.06315.92
5.3.290.0070.03714.72
5.3.280.0000.06014.56
5.3.270.0030.03714.57
5.3.260.0070.03314.68
5.3.250.0070.05714.55
5.3.240.0030.03714.66
5.3.230.0000.04014.73
5.3.220.0000.04014.59
5.3.210.0130.02714.71
5.3.200.0070.04014.49
5.3.190.0030.03014.56
5.3.180.0070.02714.48
5.3.170.0000.03714.55
5.3.160.0000.03714.54
5.3.150.0030.03314.63
5.3.140.0000.03714.54
5.3.130.0100.03014.60
5.3.120.0030.03014.60
5.3.110.0000.05714.54
5.3.100.0070.07714.05
5.3.90.0030.06714.14
5.3.80.0030.07314.08
5.3.70.0170.03714.05
5.3.60.0100.06713.93
5.3.50.0070.03313.92
5.3.40.0100.07013.97
5.3.30.0030.04314.00
5.3.20.0100.04713.76
5.3.10.0170.05313.79
5.3.00.0070.07313.78
5.2.170.0030.06313.57
5.2.160.0000.03013.57
5.2.150.0000.04313.57
5.2.140.0130.04313.57
5.2.130.0030.05013.57
5.2.120.0070.05313.57
5.2.110.0030.05313.57
5.2.100.0070.06013.57
5.2.90.0030.03313.57
5.2.80.0030.06013.57
5.2.70.0000.04713.57
5.2.60.0070.06713.57
5.2.50.0030.03013.57
5.2.40.0030.04713.57
5.2.30.0070.06013.57
5.2.20.0000.05713.57
5.2.10.0100.05313.57
5.2.00.0070.05713.57
5.1.60.0070.04013.57
5.1.50.0070.05313.57
5.1.40.0100.04713.57
5.1.30.0030.04313.57
5.1.20.0030.05713.57
5.1.10.0030.05313.57
5.1.00.0170.03313.57
5.0.50.0000.03313.57
5.0.40.0030.04313.57
5.0.30.0030.06313.57
5.0.20.0000.05013.57
5.0.10.0030.04313.57
5.0.00.0000.06713.57
4.4.90.0030.03313.57
4.4.80.0030.03313.57
4.4.70.0030.02013.57
4.4.60.0030.03313.57
4.4.50.0000.02013.57
4.4.40.0000.03013.57
4.4.30.0000.02013.57
4.4.20.0000.02713.57
4.4.10.0030.04013.57
4.4.00.0100.03013.57
4.3.110.0000.03713.57
4.3.100.0000.03013.57
4.3.90.0070.02013.57
4.3.80.0000.03713.57
4.3.70.0030.03013.57
4.3.60.0000.02713.57
4.3.50.0070.02713.57
4.3.40.0030.05313.57
4.3.30.0000.02713.57
4.3.20.0000.03713.57
4.3.10.0000.03013.57
4.3.00.0000.02713.57

preferences:
53.42 ms | 400 KiB | 5 Q