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 `c_username` = ' . $username; } else { $querystring_file = ' WHERE `c_username` = ' . $username; } } else { $querystring_file = ''; } if ($username) { $querystring_username = ' WHERE `c_username` = ' . $username; } else { $querystring_username = ''; } if ($amount > 0) { $querystring_amount = ' LIMIT ' . $amount; } else { $querystring_amount = ''; } // query $querystring = "SELECT * FROM file_comments" . $querystring_username . $querystring_amount; return $querystring; } echo comment_retrieve(7,'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.70.0150.00416.58
8.3.60.0100.01318.31
8.3.50.0090.00721.21
8.3.40.0060.00918.70
8.3.30.0100.00320.34
8.3.20.0040.00420.29
8.3.10.0000.00722.09
8.3.00.0040.00422.43
8.2.180.0110.00416.62
8.2.170.0070.01022.96
8.2.160.0070.00722.13
8.2.150.0080.00024.18
8.2.140.0080.00024.66
8.2.130.0040.00426.16
8.2.120.0040.00420.55
8.2.110.0030.00621.06
8.2.100.0040.00817.78
8.2.90.0000.00719.08
8.2.80.0000.00917.97
8.2.70.0040.00817.59
8.2.60.0000.00817.80
8.2.50.0060.00318.07
8.2.40.0000.00820.00
8.2.30.0040.00419.32
8.2.20.0030.00517.60
8.2.10.0000.00717.56
8.2.00.0050.00317.73
8.1.280.0070.01325.92
8.1.270.0000.00823.99
8.1.260.0090.00026.35
8.1.250.0040.00428.09
8.1.240.0030.00619.15
8.1.230.0130.00017.42
8.1.220.0000.00917.74
8.1.210.0030.00618.77
8.1.200.0070.00317.36
8.1.190.0040.00417.23
8.1.180.0060.00318.95
8.1.170.0000.00818.57
8.1.160.0060.00318.93
8.1.150.0050.00218.51
8.1.140.0030.00517.49
8.1.130.0000.00717.82
8.1.120.0040.00417.46
8.1.110.0070.00017.36
8.1.100.0040.00417.44
8.1.90.0070.00017.53
8.1.80.0040.00417.47
8.1.70.0030.00317.41
8.1.60.0030.00517.58
8.1.50.0050.00217.59
8.1.40.0070.00017.45
8.1.30.0040.00417.64
8.1.20.0030.00617.65
8.1.10.0050.00217.43
8.1.00.0040.00417.45
8.0.300.0070.00018.77
8.0.290.0030.00516.75
8.0.280.0040.00418.32
8.0.270.0000.00717.17
8.0.260.0030.00316.76
8.0.250.0000.00716.93
8.0.240.0030.00516.97
8.0.230.0030.00516.94
8.0.220.0000.00716.82
8.0.210.0030.00416.77
8.0.200.0050.00316.95
8.0.190.0000.00716.86
8.0.180.0020.00516.82
8.0.170.0050.00316.85
8.0.160.0000.00716.83
8.0.150.0000.00716.80
8.0.140.0040.00416.85
8.0.130.0050.00013.33
8.0.120.0030.00516.84
8.0.110.0030.00516.90
8.0.100.0050.00216.79
8.0.90.0040.00416.80
8.0.80.0000.01516.85
8.0.70.0000.00716.86
8.0.60.0040.00416.80
8.0.50.0040.00416.87
8.0.30.0110.00816.95
8.0.20.0110.00817.40
8.0.10.0070.00016.88
8.0.00.0110.00816.87
7.4.330.0000.00415.00
7.4.320.0070.00016.59
7.4.300.0060.00016.51
7.4.290.0040.00416.55
7.4.280.0080.00016.51
7.4.270.0050.00316.59
7.4.260.0000.00513.29
7.4.250.0000.00716.48
7.4.240.0070.00016.57
7.4.230.0000.00716.25
7.4.220.0110.00716.61
7.4.210.0080.00616.54
7.4.200.0000.00716.71
7.4.190.0040.00416.64
7.4.160.0030.01116.45
7.4.150.0120.00617.40
7.4.140.0110.00517.86
7.4.130.0070.01116.41
7.4.120.0060.01116.53
7.4.110.0120.01316.46
7.4.100.0060.01016.29
7.4.90.0080.00816.51
7.4.80.0110.00619.39
7.4.70.0090.00916.56
7.4.60.0120.00916.70
7.4.50.0030.00616.33
7.4.40.0070.01022.77
7.4.30.0100.00716.45
7.4.00.0130.00314.80
7.3.330.0000.00513.33
7.3.320.0000.00513.27
7.3.310.0000.00716.14
7.3.300.0060.00016.35
7.3.290.0030.01516.28
7.3.280.0050.01216.25
7.3.270.0100.00717.40
7.3.260.0160.00316.48
7.3.250.0110.00616.50
7.3.240.0070.01016.50
7.3.230.0060.01016.50
7.3.210.0130.00316.58
7.3.200.0030.01519.39
7.3.190.0100.00716.30
7.3.180.0030.01316.34
7.3.170.0100.00616.59
7.3.160.0060.01116.32
7.3.120.0070.01014.75
7.3.00.0140.00016.33
7.2.330.0070.01016.55
7.2.320.0190.00316.83
7.2.310.0130.00816.36
7.2.300.0070.01016.54
7.2.290.0130.00616.55
7.2.130.0040.01116.75
7.2.120.0030.01416.75
7.2.110.0070.00716.80
7.2.100.0100.00316.59
7.2.90.0040.00716.58
7.2.80.0040.01416.52
7.2.70.0070.00716.63
7.2.60.0050.00916.77
7.2.50.0030.00916.99
7.2.40.0060.00916.99
7.2.30.0060.00916.71
7.2.20.0060.00916.94
7.2.10.0110.00316.45
7.2.00.0050.01118.17
7.1.250.0040.01115.47
7.1.240.0030.00615.43
7.1.230.0000.01115.91
7.1.220.0040.00415.43
7.1.210.0030.01215.62
7.1.200.0120.00115.77
7.1.190.0040.00815.81
7.1.180.0040.01215.52
7.1.170.0040.00815.77
7.1.160.0070.00715.73
7.1.150.0110.00415.66
7.1.140.0030.00615.54
7.1.130.0060.00615.69
7.1.120.0100.00015.61
7.1.110.0070.00715.45
7.1.100.0060.00816.87
7.1.90.0000.01315.67
7.1.80.0040.01115.75
7.1.70.0020.01016.31
7.1.60.0080.01017.47
7.1.50.0020.01716.48
7.1.40.0110.00415.60
7.1.30.0060.00615.61
7.1.20.0030.00915.86
7.1.10.0110.00415.23
7.1.00.0020.04618.89
7.0.330.0030.00715.27
7.0.320.0000.00814.95
7.0.310.0070.00715.37
7.0.300.0030.01015.36
7.0.290.0060.00315.60
7.0.280.0040.00415.33
7.0.270.0000.00915.38
7.0.260.0030.01015.31
7.0.250.0060.00315.41
7.0.240.0040.00415.39
7.0.230.0000.01415.43
7.0.220.0080.00015.07
7.0.210.0070.00315.38
7.0.200.0090.00715.22
7.0.190.0130.00015.48
7.0.180.0040.00415.40
7.0.170.0030.00615.42
7.0.160.0100.00315.39
7.0.150.0030.00615.54
7.0.140.0060.03818.63
7.0.130.0000.00915.29
7.0.120.0030.00615.41
7.0.110.0030.00915.32
7.0.100.0030.01015.03
7.0.90.0060.00915.45
7.0.80.0060.00315.32
7.0.70.0330.03517.42
7.0.60.0480.04617.70
7.0.50.0300.04017.79
7.0.40.0080.04316.87
7.0.30.0030.04116.72
7.0.20.0070.04516.82
7.0.10.0100.04316.78
7.0.00.0050.04116.79
5.6.380.0080.00614.07
5.6.370.0090.00014.56
5.6.360.0030.01314.54
5.6.350.0030.01014.14
5.6.340.0090.00614.60
5.6.330.0030.01014.10
5.6.320.0060.01214.11
5.6.310.0130.00314.40
5.6.300.0050.00514.35
5.6.290.0070.00714.48
5.6.280.0030.04217.75
5.6.270.0060.00614.53
5.6.260.0100.00714.42
5.6.250.0070.00714.43
5.6.240.0000.00814.12
5.6.230.0030.01014.27
5.6.220.0080.02217.47
5.6.210.0050.04017.42
5.6.200.0030.05017.47
5.6.190.0050.04617.70
5.6.180.0050.03117.56
5.6.170.0100.02117.72
5.6.160.0070.04917.73
5.6.150.0100.04017.67
5.6.140.0050.04917.77
5.6.130.0070.04517.74
5.6.120.0050.03017.80
5.6.110.0050.04817.68
5.6.100.0060.03017.57
5.6.90.0150.03717.66
5.6.80.0050.04617.26
5.6.70.0060.03417.19
5.6.60.0090.03917.42
5.6.50.0090.04217.34
5.6.40.0080.04217.33
5.6.30.0070.04017.30
5.6.20.0070.03317.24
5.6.10.0050.04417.20
5.6.00.0050.04017.23
5.5.380.0060.00611.36
5.5.370.0070.00311.20
5.5.360.0060.04615.96
5.5.350.0090.03515.67
5.5.340.0050.04016.04
5.5.330.0050.04715.96
5.5.320.0090.04015.93
5.5.310.0050.04616.10
5.5.300.0060.04216.08
5.5.290.0090.02815.99
5.5.280.0120.04016.12
5.5.270.0080.04216.10
5.5.260.0060.04316.05
5.5.250.0090.02715.80
5.5.240.0080.04315.67
5.5.230.0020.04815.61
5.5.220.0080.04515.70
5.5.210.0050.04015.48
5.5.200.0030.04515.78
5.5.190.0060.04215.61
5.5.180.0050.04715.72
5.5.170.0080.00310.93
5.5.160.0070.04015.62
5.5.150.0070.03215.53
5.5.140.0070.04215.61
5.5.130.0100.03715.75
5.5.120.0050.02915.66
5.5.110.0050.04515.49
5.5.100.0080.04515.70
5.5.90.0050.03015.66
5.5.80.0050.03015.37
5.5.70.0050.04315.66
5.5.60.0050.03715.52
5.5.50.0060.04415.46
5.5.40.0030.04015.50
5.5.30.0110.02815.40
5.5.20.0040.04215.33
5.5.10.0100.03915.71
5.5.00.0080.04215.56
5.4.450.0050.04515.28
5.4.440.0050.04815.38
5.4.430.0050.03615.21
5.4.420.0060.04315.17
5.4.410.0090.03915.16
5.4.400.0120.03615.05
5.4.390.0020.04615.13
5.4.380.0150.03714.82
5.4.370.0020.04315.08
5.4.360.0000.02614.95
5.4.350.0020.04614.92
5.4.340.0050.04214.84
5.4.330.0080.00310.80
5.4.320.0080.02814.99
5.4.310.0050.03315.11
5.4.300.0020.04014.87
5.4.290.0070.02914.87
5.4.280.0100.03715.13
5.4.270.0100.02814.92
5.4.260.0050.04614.88
5.4.250.0070.03914.74
5.4.240.0060.04014.97
5.4.230.0030.02814.75
5.4.220.0070.04015.04
5.4.210.0070.03014.94
5.4.200.0030.03915.04
5.4.190.0050.04215.08
5.4.180.0060.04015.00
5.4.170.0070.03414.96
5.4.160.0100.03714.93
5.4.150.0030.04314.94
5.4.140.0060.03113.69
5.4.130.0020.04213.73
5.4.120.0030.04313.63
5.4.110.0080.03813.61
5.4.100.0050.03513.72
5.4.90.0020.04213.74
5.4.80.0050.03913.71
5.4.70.0060.04013.79
5.4.60.0120.03513.74
5.4.50.0070.03313.66
5.4.40.0180.02913.60
5.4.30.0070.03513.56
5.4.20.0020.02513.61
5.4.10.0050.03813.69
5.4.00.0080.03513.30
5.3.290.0030.04312.49
5.3.280.0070.04012.58
5.3.270.0040.04412.53
5.3.260.0030.03512.61
5.3.250.0050.03912.57
5.3.240.0030.03012.52
5.3.230.0050.04512.50
5.3.220.0050.02212.51
5.3.210.0050.02612.51
5.3.200.0060.04212.43
5.3.190.0080.03312.41
5.3.180.0070.03012.63
5.3.170.0080.03812.58
5.3.160.0050.04112.43
5.3.150.0110.02812.59
5.3.140.0050.04112.54
5.3.130.0100.03512.59
5.3.120.0020.03612.61
5.3.110.0050.03512.56
5.3.100.0050.04212.31
5.3.90.0060.03812.28
5.3.80.0070.04412.12
5.3.70.0090.03812.20
5.3.60.0060.03912.27
5.3.50.0070.03312.16
5.3.40.0020.03412.23
5.3.30.0030.03412.14
5.3.20.0020.04011.97
5.3.10.0040.04111.96
5.3.00.0050.04011.95
5.2.170.0050.03211.08
5.2.160.0020.02611.08
5.2.150.0060.03311.08
5.2.140.0060.03311.08
5.2.130.0030.03411.08
5.2.120.0020.03711.08
5.2.110.0040.03411.08
5.2.100.0110.02711.08
5.2.90.0020.03311.08
5.2.80.0060.03011.08
5.2.70.0060.03111.08
5.2.60.0020.03411.08
5.2.50.0060.03111.08
5.2.40.0060.03011.08
5.2.30.0030.03511.08
5.2.20.0030.03611.08
5.2.10.0070.02811.08
5.2.00.0070.03011.08
5.1.60.0050.02811.08
5.1.50.0060.02611.08
5.1.40.0060.02611.08
5.1.30.0060.02111.08
5.1.20.0070.03011.08
5.1.10.0030.03311.08
5.1.00.0010.03211.08
5.0.50.0020.02511.08
5.0.40.0020.02511.08
5.0.30.0000.03511.08
5.0.20.0020.02211.08
5.0.10.0040.01811.08
5.0.00.0050.03311.08
4.4.90.0020.01911.08
4.4.80.0020.02011.08
4.4.70.0020.02011.08
4.4.60.0020.01711.08
4.4.50.0050.01711.08
4.4.40.0050.02311.08
4.4.30.0030.02011.08
4.4.20.0050.01511.08
4.4.10.0020.01711.08
4.4.00.0010.03111.08
4.3.110.0030.01711.08
4.3.100.0000.01911.08
4.3.90.0000.01711.08
4.3.80.0010.02811.08
4.3.70.0040.01811.08
4.3.60.0000.01911.08
4.3.50.0020.02011.08
4.3.40.0040.02611.08
4.3.30.0030.01811.08
4.3.20.0000.02211.08
4.3.10.0030.01811.08
4.3.00.0000.02111.08

preferences:
65.77 ms | 401 KiB | 5 Q