3v4l.org

run code in 300+ PHP versions simultaneously
<?php function comment_retrieve($amount = 0, $username = null, $file = null) { if ($file) { if ($amount > 0) { $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(7,null,'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.40.0110.00418.68
8.3.30.0070.00718.92
8.3.20.0040.00420.20
8.3.10.0080.00021.95
8.3.00.0040.00422.44
8.2.170.0070.00722.96
8.2.160.0110.00420.85
8.2.150.0080.00024.18
8.2.140.0080.00024.66
8.2.130.0000.00826.16
8.2.120.0040.00419.44
8.2.110.0100.00022.24
8.2.100.0080.00319.51
8.2.90.0040.00419.05
8.2.80.0050.00317.97
8.2.70.0030.00717.50
8.2.60.0040.00417.93
8.2.50.0000.00818.07
8.2.40.0000.00918.22
8.2.30.0000.00718.08
8.2.20.0030.00517.61
8.2.10.0000.00819.53
8.2.00.0060.00317.82
8.1.270.0030.00622.10
8.1.260.0050.00226.35
8.1.250.0090.00028.09
8.1.240.0000.00923.84
8.1.230.0070.00319.17
8.1.220.0000.00917.74
8.1.210.0080.00018.77
8.1.200.0100.00017.25
8.1.190.0000.00817.53
8.1.180.0050.00318.10
8.1.170.0000.00818.59
8.1.160.0000.00821.94
8.1.150.0080.00018.50
8.1.140.0000.00817.48
8.1.130.0000.00817.84
8.1.120.0030.00517.50
8.1.110.0080.00017.45
8.1.100.0050.00217.47
8.1.90.0000.00717.34
8.1.80.0040.00417.46
8.1.70.0030.00317.46
8.1.60.0040.00417.47
8.1.50.0080.00017.42
8.1.40.0080.00017.52
8.1.30.0040.00417.59
8.1.20.0060.00317.66
8.1.10.0070.00017.53
8.1.00.0020.00517.47
8.0.300.0050.00218.77
8.0.290.0000.00817.18
8.0.280.0070.00018.38
8.0.270.0000.00717.19
8.0.260.0060.00016.71
8.0.250.0030.00316.99
8.0.240.0020.00517.03
8.0.230.0030.00317.01
8.0.220.0000.00716.95
8.0.210.0030.00516.89
8.0.200.0060.00016.90
8.0.190.0000.00816.96
8.0.180.0040.00416.98
8.0.170.0040.00416.92
8.0.160.0070.00016.80
8.0.150.0080.00016.89
8.0.140.0040.00416.76
8.0.130.0050.00013.20
8.0.120.0040.00416.92
8.0.110.0020.00516.80
8.0.100.0000.01016.72
8.0.90.0000.00716.69
8.0.80.0080.00816.86
8.0.70.0000.00716.76
8.0.60.0000.00716.73
8.0.50.0030.00516.97
8.0.30.0140.00817.13
8.0.20.0150.00717.40
8.0.10.0030.00416.79
8.0.00.0080.00916.77
7.4.330.0030.00315.01
7.4.320.0060.00016.61
7.4.300.0030.00316.66
7.4.290.0030.00316.53
7.4.280.0070.00016.62
7.4.270.0030.00316.50
7.4.260.0090.00016.54
7.4.250.0040.00416.54
7.4.240.0030.00316.49
7.4.230.0000.00716.70
7.4.220.0100.01316.47
7.4.210.0060.01216.67
7.4.200.0000.00716.45
7.4.190.0000.00716.48
7.4.160.0090.01216.35
7.4.150.0090.00917.40
7.4.140.0050.01217.86
7.4.130.0140.00516.49
7.4.120.0080.00816.48
7.4.110.0090.00916.50
7.4.100.0030.01616.37
7.4.90.0180.00616.66
7.4.80.0090.00919.39
7.4.70.0030.01216.45
7.4.60.0130.00316.48
7.4.50.0000.00816.34
7.4.40.0070.01122.77
7.4.30.0110.01116.52
7.4.00.0070.01015.05
7.3.330.0000.00613.15
7.3.320.0030.00313.34
7.3.310.0040.00416.17
7.3.300.0030.00316.18
7.3.290.0060.01116.33
7.3.280.0110.00616.32
7.3.270.0180.00617.40
7.3.260.0180.00616.39
7.3.250.0120.00916.47
7.3.240.0130.00516.65
7.3.230.0100.00716.66
7.3.210.0040.01416.60
7.3.200.0070.01119.39
7.3.190.0130.01016.44
7.3.180.0040.01116.48
7.3.170.0130.00716.46
7.3.160.0110.00716.27
7.3.120.0090.00615.07
7.2.330.0060.01016.80
7.2.320.0140.01016.76
7.2.310.0180.00616.50
7.2.300.0110.00516.62
7.2.290.0040.01216.82
7.2.00.0070.00719.65
7.1.100.0060.00618.13
7.1.70.0070.00016.81
7.1.60.0070.01719.82
7.1.50.0090.00616.95
7.1.00.0100.07022.45
7.0.200.0120.00016.90
7.0.140.0070.07022.04
7.0.70.0030.05719.91
7.0.60.0100.05320.06
7.0.50.0100.08020.31
7.0.40.0030.05020.08
7.0.30.0170.07320.08
7.0.20.0070.04020.05
7.0.10.0070.08720.07
7.0.00.0070.09019.95
5.6.280.0000.07721.13
5.6.220.0100.06720.49
5.6.210.0100.08320.67
5.6.200.0030.04721.02
5.6.190.0100.08321.18
5.6.180.0070.07721.07
5.6.170.0070.04320.96
5.6.160.0170.07021.02
5.6.150.0170.07021.11
5.6.140.0070.07021.02
5.6.130.0100.08321.01
5.6.120.0070.04321.11
5.6.110.0100.09321.03
5.6.100.0030.04320.93
5.6.90.0070.04321.12
5.6.80.0030.04020.50
5.6.70.0000.04320.44
5.6.60.0070.08020.33
5.6.50.0000.04720.50
5.6.40.0030.04720.36
5.6.30.0070.04020.54
5.6.20.0030.04020.39
5.6.10.0070.04020.46
5.6.00.0030.04020.25
5.5.360.0170.07720.39
5.5.350.0100.09020.46
5.5.340.0070.07720.91
5.5.330.0070.04320.76
5.5.320.0130.04020.77
5.5.310.0100.03720.88
5.5.300.0130.07720.64
5.5.290.0170.08020.74
5.5.280.0130.05320.82
5.5.270.0170.04720.91
5.5.260.0030.06020.86
5.5.250.0030.04320.70
5.5.240.0030.04020.21
5.5.230.0030.04020.16
5.5.220.0000.04720.11
5.5.210.0070.03720.11
5.5.200.0070.03720.14
5.5.190.0100.05320.12
5.5.180.0030.04320.23
5.5.160.0130.03020.15
5.5.150.0030.03720.21
5.5.140.0100.03320.09
5.5.130.0070.03320.15
5.5.120.0030.03020.25
5.5.110.0030.03320.18
5.5.100.0000.04020.14
5.5.90.0030.04020.17
5.5.80.0030.03020.11
5.5.70.0000.07320.15
5.5.60.0030.04320.16
5.5.50.0030.03720.04
5.5.40.0000.03720.15
5.5.30.0030.04720.00
5.5.20.0000.06720.16
5.5.10.0030.04020.11
5.5.00.0030.04020.01
5.4.450.0200.07319.27
5.4.440.0030.04319.49
5.4.430.0100.03719.22
5.4.420.0070.04019.52
5.4.410.0100.03319.07
5.4.400.0100.03319.12
5.4.390.0030.03719.18
5.4.380.0100.03319.18
5.4.370.0130.03018.91
5.4.360.0070.05019.21
5.4.350.0000.04019.18
5.4.340.0070.06719.03
5.4.320.0000.04019.10
5.4.310.0030.03719.12
5.4.300.0030.03019.16
5.4.290.0030.03719.23
5.4.280.0030.04019.04
5.4.270.0000.03319.03
5.4.260.0000.04019.23
5.4.250.0030.03318.86
5.4.240.0000.04018.94
5.4.230.0030.03719.04
5.4.220.0070.05319.12
5.4.210.0030.03719.02
5.4.200.0030.04018.98
5.4.190.0100.06018.89
5.4.180.0030.03018.93
5.4.170.0000.04018.91
5.4.160.0030.03719.14
5.4.150.0030.03718.83
5.4.140.0000.03316.25
5.4.130.0000.03716.42
5.4.120.0070.05016.18
5.4.110.0100.06716.36
5.4.100.0070.07716.42
5.4.90.0100.07716.34
5.4.80.0030.07716.33
5.4.70.0070.07716.47
5.4.60.0100.05716.49
5.4.50.0200.06716.47
5.4.40.0100.06716.30
5.4.30.0070.06716.48
5.4.20.0070.05016.41
5.4.10.0100.05016.46
5.4.00.0070.04715.90
5.3.290.0070.04314.72
5.3.280.0000.04014.59
5.3.270.0030.04314.57
5.3.260.0030.03714.72
5.3.250.0030.03714.72
5.3.240.0070.04714.64
5.3.230.0030.04014.59
5.3.220.0070.03714.55
5.3.210.0030.05714.67
5.3.200.0070.05014.57
5.3.190.0100.07314.55
5.3.180.0100.06714.63
5.3.170.0030.06714.65
5.3.160.0070.08014.54
5.3.150.0100.04714.61
5.3.140.0100.07314.48
5.3.130.0000.04314.60
5.3.120.0100.07314.66
5.3.110.0100.07714.50
5.3.100.0070.03714.05
5.3.90.0000.04014.08
5.3.80.0000.07014.05
5.3.70.0030.05313.95
5.3.60.0070.07314.13
5.3.50.0030.07713.92
5.3.40.0000.04713.84
5.3.30.0100.05713.89
5.3.20.0130.05313.75
5.3.10.0000.03713.58
5.3.00.0000.03713.70
5.2.170.0100.06012.21
5.2.160.0030.05712.21
5.2.150.0030.06712.21
5.2.140.0000.04012.21
5.2.130.0030.04012.21
5.2.120.0030.05712.21
5.2.110.0000.03012.21
5.2.100.0100.03012.21
5.2.90.0000.03012.21
5.2.80.0000.05012.21
5.2.70.0070.02712.21
5.2.60.0000.03312.21
5.2.50.0000.05012.21
5.2.40.0070.05012.21
5.2.30.0030.04712.21
5.2.20.0030.04712.21
5.2.10.0000.04012.21
5.2.00.0000.06712.21
5.1.60.0070.04712.21
5.1.50.0070.05312.21
5.1.40.0070.05012.21
5.1.30.0000.06012.21
5.1.20.0130.05312.21
5.1.10.0070.05712.21
5.1.00.0000.03312.21
5.0.50.0030.04012.21
5.0.40.0000.04712.21
5.0.30.0000.03712.21
5.0.20.0000.03712.21
5.0.10.0030.02312.21
5.0.00.0030.06312.21
4.4.90.0030.01312.21
4.4.80.0000.03012.21
4.4.70.0030.02012.21
4.4.60.0030.01312.21
4.4.50.0000.03312.21
4.4.40.0070.05012.21
4.4.30.0000.03712.21
4.4.20.0030.03312.21
4.4.10.0030.02012.21
4.4.00.0000.03712.21
4.3.110.0000.01712.21
4.3.100.0000.02712.21
4.3.90.0030.02012.21
4.3.80.0070.04012.21
4.3.70.0000.03012.21
4.3.60.0070.02012.21
4.3.50.0030.01312.21
4.3.40.0030.02712.21
4.3.30.0030.01312.21
4.3.20.0000.03312.21
4.3.10.0030.01312.21
4.3.00.0030.01312.21

preferences:
43.26 ms | 400 KiB | 5 Q