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','HJFG');

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.00618.06
8.3.50.0110.00621.27
8.3.40.0120.00618.86
8.3.30.0070.00720.25
8.3.20.0100.01020.38
8.3.10.0030.00621.87
8.3.00.0040.00422.40
8.2.180.0120.00916.38
8.2.170.0100.01022.96
8.2.160.0100.00322.11
8.2.150.0070.00724.18
8.2.140.0080.00024.66
8.2.130.0040.00426.16
8.2.120.0000.00820.73
8.2.110.0050.00522.14
8.2.100.0000.01217.84
8.2.90.0040.00419.22
8.2.80.0030.00519.30
8.2.70.0040.00417.63
8.2.60.0000.00917.93
8.2.50.0030.00918.07
8.2.40.0040.00420.07
8.2.30.0060.00319.55
8.2.20.0040.00417.70
8.2.10.0040.00417.74
8.2.00.0040.00417.74
8.1.280.0120.00925.92
8.1.270.0000.00823.99
8.1.260.0070.00026.35
8.1.250.0080.00028.09
8.1.240.0070.00323.96
8.1.230.0000.01119.02
8.1.220.0040.00417.74
8.1.210.0040.00418.77
8.1.200.0030.00617.35
8.1.190.0070.00417.53
8.1.180.0040.00418.10
8.1.170.0000.00818.58
8.1.160.0030.00618.77
8.1.150.0040.00418.54
8.1.140.0070.00417.44
8.1.130.0000.00717.73
8.1.120.0000.00717.36
8.1.110.0040.00417.47
8.1.100.0030.00417.40
8.1.90.0040.00417.49
8.1.80.0000.00817.36
8.1.70.0000.00717.46
8.1.60.0080.00017.59
8.1.50.0060.00317.55
8.1.40.0000.00817.52
8.1.30.0000.00717.58
8.1.20.0000.00917.50
8.1.10.0000.00817.41
8.1.00.0000.00917.45
8.0.300.0040.00418.77
8.0.290.0030.00617.18
8.0.280.0040.00418.35
8.0.270.0000.00717.21
8.0.260.0000.00616.82
8.0.250.0000.00716.82
8.0.240.0000.00916.89
8.0.230.0030.00316.93
8.0.220.0030.00316.85
8.0.210.0000.00716.80
8.0.200.0000.00816.97
8.0.190.0000.00716.95
8.0.180.0050.00316.87
8.0.170.0030.00516.88
8.0.160.0070.00016.86
8.0.150.0000.00716.72
8.0.140.0000.00816.77
8.0.130.0030.00613.25
8.0.120.0000.00816.83
8.0.110.0050.00216.78
8.0.100.0040.00416.69
8.0.90.0080.00016.71
8.0.80.0000.01616.92
8.0.70.0050.00216.84
8.0.60.0000.00716.79
8.0.50.0080.00016.92
8.0.30.0050.01317.19
8.0.20.0140.00417.40
8.0.10.0070.00017.02
8.0.00.0080.00916.59
7.4.330.0000.00415.00
7.4.320.0000.00616.50
7.4.300.0000.00616.52
7.4.290.0030.00316.61
7.4.280.0070.00016.64
7.4.270.0030.00316.55
7.4.260.0030.00313.35
7.4.250.0000.00816.52
7.4.240.0030.00316.59
7.4.230.0070.00016.48
7.4.220.0070.01116.37
7.4.210.0050.00916.54
7.4.200.0070.00016.30
7.4.190.0030.00316.54
7.4.160.0110.00716.66
7.4.150.0070.01017.40
7.4.140.0050.01617.86
7.4.130.0090.00716.51
7.4.120.0040.01216.48
7.4.110.0060.01716.60
7.4.100.0100.00716.53
7.4.90.0070.01016.67
7.4.80.0090.00919.39
7.4.70.0090.00916.59
7.4.60.0100.00716.37
7.4.50.0060.00316.43
7.4.40.0080.00822.77
7.4.30.0130.00616.52
7.4.00.0050.01015.02
7.3.330.0050.00013.17
7.3.320.0020.00213.30
7.3.310.0030.00316.22
7.3.300.0030.00516.32
7.3.290.0000.01516.28
7.3.280.0080.01016.31
7.3.270.0160.00817.40
7.3.260.0220.01216.41
7.3.250.0090.00816.53
7.3.240.0160.00016.29
7.3.230.0100.00716.46
7.3.210.0100.00716.62
7.3.200.0120.00619.39
7.3.190.0150.00016.42
7.3.180.0040.01816.32
7.3.170.0060.01016.51
7.3.160.0080.00816.39
7.3.120.0060.01014.97
7.3.110.0160.00314.64
7.3.100.0070.01014.82
7.3.90.0060.00614.96
7.3.80.0040.01514.66
7.3.70.0090.00314.82
7.3.60.0000.01714.82
7.3.50.0070.01014.97
7.3.40.0030.00914.73
7.3.30.0060.00614.73
7.3.20.0030.01216.36
7.3.10.0030.01016.50
7.3.00.0060.00916.71
7.2.330.0090.00916.74
7.2.320.0100.00716.43
7.2.310.0090.01216.64
7.2.300.0060.01016.67
7.2.290.0090.00816.79
7.2.250.0130.00714.57
7.2.240.0040.01414.92
7.2.230.0030.01615.00
7.2.220.0040.01514.94
7.2.210.0120.00315.14
7.2.200.0000.01714.96
7.2.190.0070.01014.99
7.2.180.0030.01015.04
7.2.170.0040.01215.09
7.2.60.0080.00816.85
7.2.00.0030.01219.66
7.1.330.0100.00315.82
7.1.320.0030.01015.51
7.1.310.0110.00715.46
7.1.300.0030.00915.86
7.1.290.0090.00615.78
7.1.280.0110.00315.58
7.1.270.0030.01215.66
7.1.260.0070.00715.70
7.1.200.0030.00915.77
7.1.100.0040.00718.03
7.1.70.0040.00417.02
7.1.60.0140.01019.21
7.1.50.0100.01316.98
7.1.00.0030.03322.43
7.0.200.0000.00716.80
7.0.140.0070.06722.07
7.0.100.0030.04719.93
7.0.90.0100.08019.92
7.0.80.0000.07719.84
7.0.70.0170.04019.93
7.0.60.0030.06720.00
7.0.50.0170.04320.39
7.0.40.0070.07019.95
7.0.30.0130.08720.09
7.0.20.0030.08720.11
7.0.10.0100.07719.94
7.0.00.0070.07320.17
5.6.280.0030.07720.92
5.6.250.0100.07320.54
5.6.240.0070.05720.66
5.6.230.0170.06320.66
5.6.220.0030.06720.68
5.6.210.0030.05720.59
5.6.200.0030.04721.12
5.6.190.0100.08721.05
5.6.180.0070.08721.12
5.6.170.0170.08021.05
5.6.160.0000.08720.95
5.6.150.0130.08320.96
5.6.140.0070.10021.06
5.6.130.0070.06320.93
5.6.120.0100.07721.02
5.6.110.0000.06021.04
5.6.100.0070.07021.04
5.6.90.0100.05321.10
5.6.80.0070.06720.45
5.6.70.0100.07720.41
5.6.60.0100.07020.34
5.6.50.0070.04020.34
5.6.40.0030.04720.30
5.6.30.0130.07020.25
5.6.20.0030.05020.46
5.6.10.0030.04720.30
5.6.00.0070.08020.30
5.5.380.0130.07320.39
5.5.370.0070.04320.45
5.5.360.0000.05720.37
5.5.350.0030.07020.41
5.5.340.0070.04720.92
5.5.330.0030.08720.79
5.5.320.0070.06320.89
5.5.310.0030.08020.84
5.5.300.0030.06320.79
5.5.290.0070.08020.92
5.5.280.0070.07320.89
5.5.270.0100.09020.79
5.5.260.0100.06320.60
5.5.250.0100.05720.68
5.5.240.0000.05320.18
5.5.230.0170.07320.28
5.5.220.0070.07020.29
5.5.210.0070.05020.16
5.5.200.0030.04720.29
5.5.190.0100.07720.00
5.5.180.0130.07720.11
5.5.160.0070.06720.25
5.5.150.0030.08720.16
5.5.140.0200.04020.17
5.5.130.0100.07020.18
5.5.120.0030.04320.13
5.5.110.0100.04320.24
5.5.100.0130.07020.13
5.5.90.0170.05320.07
5.5.80.0130.07720.10
5.5.70.0100.06720.07
5.5.60.0130.07020.15
5.5.50.0030.04719.93
5.5.40.0200.06320.15
5.5.30.0030.08020.09
5.5.20.0170.05319.96
5.5.10.0070.05320.02
5.5.00.0070.05020.07
5.4.450.0070.04019.56
5.4.440.0070.05019.36
5.4.430.0070.07319.48
5.4.420.0070.06319.27
5.4.410.0070.07319.25
5.4.400.0070.04319.09
5.4.390.0070.07719.09
5.4.380.0070.03719.04
5.4.370.0100.03719.05
5.4.360.0070.04719.04
5.4.350.0070.03719.16
5.4.340.0070.07719.24
5.4.320.0100.07319.05
5.4.310.0100.07319.14
5.4.300.0030.08019.12
5.4.290.0000.05019.20
5.4.280.0070.07319.18
5.4.270.0000.04018.87
5.4.260.0070.04718.96
5.4.250.0030.07719.15
5.4.240.0070.08019.20
5.4.230.0030.04719.12
5.4.220.0200.05718.84
5.4.210.0130.07318.93
5.4.200.0100.06019.20
5.4.190.0000.06719.22
5.4.180.0070.07719.04
5.4.170.0100.07019.11
5.4.160.0070.07319.11
5.4.150.0000.04318.89
5.4.140.0030.06316.33
5.4.130.0070.03316.32
5.4.120.0030.07016.43
5.4.110.0100.08016.50
5.4.100.0000.07716.32
5.4.90.0070.07316.41
5.4.80.0070.06316.30
5.4.70.0070.06016.44
5.4.60.0030.07716.48
5.4.50.0100.07016.31
5.4.40.0070.06316.37
5.4.30.0030.04316.44
5.4.20.0070.04016.31
5.4.10.0000.06016.31
5.4.00.0030.07315.90
5.3.290.0030.07714.64
5.3.280.0070.04014.62
5.3.270.0100.06014.59
5.3.260.0030.03714.63
5.3.250.0070.07014.58
5.3.240.0100.05714.63
5.3.230.0000.08014.52
5.3.220.0100.07714.70
5.3.210.0070.07014.54
5.3.200.0130.04014.50
5.3.190.0100.07714.70
5.3.180.0030.08014.62
5.3.170.0000.08014.62
5.3.160.0100.04014.62
5.3.150.0130.04714.59
5.3.140.0170.06014.66
5.3.130.0070.07714.63
5.3.120.0100.06714.44
5.3.110.0070.07314.64
5.3.100.0130.07014.15
5.3.90.0030.03713.95
5.3.80.0070.07714.15
5.3.70.0100.07014.02
5.3.60.0100.07314.05
5.3.50.0000.06713.92
5.3.40.0100.06713.97
5.3.30.0130.06713.96
5.3.20.0000.04313.68
5.3.10.0070.07013.55
5.3.00.0070.07013.70
5.2.170.0000.03011.22
5.2.160.0030.06311.04
5.2.150.0030.06311.00
5.2.140.0000.06711.01
5.2.130.0100.05711.11
5.2.120.0100.05311.21
5.2.110.0070.03311.01
5.2.100.0030.04011.16
5.2.90.0070.05711.13
5.2.80.0030.05311.08
5.2.70.0030.04311.16
5.2.60.0100.05310.96
5.2.50.0070.03711.05
5.2.40.0000.04010.88
5.2.30.0170.04711.11
5.2.20.0000.05010.99
5.2.10.0100.04710.77
5.2.00.0070.03010.62
5.1.60.0070.0279.88
5.1.50.0070.05010.07
5.1.40.0030.0609.81
5.1.30.0030.05310.48
5.1.20.0000.05710.41
5.1.10.0070.04710.13
5.1.00.0030.0309.91
5.0.50.0100.0338.58
5.0.40.0070.0378.45
5.0.30.0000.0478.45
5.0.20.0030.0238.45
5.0.10.0070.0308.45
5.0.00.0030.0508.45
4.4.90.0030.0338.45
4.4.80.0000.0238.45
4.4.70.0030.0178.45
4.4.60.0030.0238.45
4.4.50.0000.0178.45
4.4.40.0000.0378.45
4.4.30.0070.0278.45
4.4.20.0000.0278.45
4.4.10.0030.0278.45
4.4.00.0070.0508.45
4.3.110.0030.0378.45
4.3.100.0030.0338.45
4.3.90.0070.0178.45
4.3.80.0030.0478.45
4.3.70.0070.0208.45
4.3.60.0030.0278.45
4.3.50.0070.0308.45
4.3.40.0030.0478.45
4.3.30.0030.0338.45
4.3.20.0000.0308.45
4.3.10.0030.0238.45
4.3.00.0070.0338.45

preferences:
41.82 ms | 404 KiB | 6 Q