3v4l.org

run code in 300+ PHP versions simultaneously
<? function get_menu() { $result = mysql_query("SELECT * FROM posts WHERE parent=0"); do { $res_array[$count] = $row; $count++; } while($row = mysql_fetch_array($result)); return $res_array; } function get_submenu($parent) { $result = mysql_query("SELECT * FROM posts WHERE parent=".$parent); do { error_reporting(0); $res_array[$count] = $row; $count++; } while($row = mysql_fetch_array($result)); return $res_array; } ?>

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.00716.13
8.3.50.0090.01117.04
8.3.40.0100.00718.77
8.3.30.0040.01118.61
8.3.20.0050.00318.31
8.3.10.0040.00418.50
8.3.00.0080.00019.13
8.2.180.0120.00316.63
8.2.170.0080.01222.96
8.2.160.0070.00720.97
8.2.150.0030.00524.18
8.2.140.0040.00424.66
8.2.130.0080.00026.16
8.2.120.0040.00421.00
8.2.110.0000.01022.25
8.2.100.0080.00317.66
8.2.90.0000.00819.07
8.2.80.0050.00317.97
8.2.70.0090.00017.38
8.2.60.0030.00617.91
8.2.50.0040.00418.07
8.2.40.0050.00218.03
8.2.30.0040.00417.85
8.2.20.0030.00617.39
8.2.10.0050.00317.54
8.2.00.0040.00417.64
8.1.280.0070.00725.92
8.1.270.0000.00724.66
8.1.260.0060.00326.35
8.1.250.0070.00028.09
8.1.240.0070.00323.92
8.1.230.0110.00017.42
8.1.220.0000.00817.74
8.1.210.0060.00318.77
8.1.200.0040.00717.10
8.1.190.0040.00417.39
8.1.180.0030.00618.10
8.1.170.0040.00418.83
8.1.160.0000.00818.74
8.1.150.0000.00718.37
8.1.140.0000.00717.23
8.1.130.0030.00317.86
8.1.120.0030.00317.36
8.1.110.0020.00517.37
8.1.100.0030.00317.32
8.1.90.0040.00417.35
8.1.80.0000.00717.21
8.1.70.0030.00517.27
8.1.60.0040.00417.45
8.1.50.0040.00417.32
8.1.40.0040.00417.34
8.1.30.0050.00217.39
8.1.20.0000.00717.39
8.1.10.0040.00417.39
8.1.00.0000.00717.31
8.0.300.0000.00818.77
8.0.290.0040.00416.58
8.0.280.0070.00018.26
8.0.270.0070.00017.09
8.0.260.0040.00416.59
8.0.250.0070.00016.70
8.0.240.0050.00316.84
8.0.230.0030.00316.85
8.0.220.0070.00016.70
8.0.210.0030.00316.76
8.0.200.0000.00716.68
8.0.190.0070.00016.77
8.0.180.0090.00016.79
8.0.170.0040.00416.66
8.0.160.0070.00016.67
8.0.150.0100.00016.68
8.0.140.0060.00616.71
8.0.130.0000.00513.16
8.0.120.0000.00716.57
8.0.110.0000.00716.56
8.0.100.0030.00316.65
8.0.90.0000.00816.82
8.0.80.0040.01116.75
8.0.70.0050.00316.55
8.0.60.0000.00816.67
8.0.50.0040.00416.80
8.0.30.0120.00616.63
8.0.20.0100.00716.90
8.0.10.0000.00816.83
8.0.00.0110.00916.66
7.4.330.0030.00312.91
7.4.320.0000.00716.45
7.4.300.0030.00316.28
7.4.290.0030.00316.50
7.4.280.0000.00716.50
7.4.270.0040.00416.35
7.4.260.0030.00313.12
7.4.250.0070.00016.41
7.4.240.0000.00716.41
7.4.230.0070.00016.16
7.4.220.0130.01016.36
7.4.210.0060.01016.48
7.4.200.0040.00416.16
7.4.190.0030.00316.22
7.4.160.0100.00716.40
7.4.150.0070.01016.51
7.4.140.0120.00616.31
7.4.130.0170.00416.30
7.4.120.0110.00916.36
7.4.110.0070.01016.29
7.4.100.0100.00716.49
7.4.90.0110.00716.34
7.4.80.0060.01019.39
7.4.70.0150.00716.43
7.4.60.0060.00916.27
7.4.50.0000.01316.28
7.4.40.0090.00616.38
7.4.30.0100.00616.49
7.4.00.0050.01314.73
7.3.330.0000.00613.21
7.3.320.0030.00313.18
7.3.310.0020.00516.19
7.3.300.0040.00415.95
7.3.290.0070.01016.29
7.3.280.0090.01016.07
7.3.270.0160.00016.23
7.3.260.0060.01016.49
7.3.250.0080.00916.33
7.3.240.0110.00516.35
7.3.230.0000.01616.11
7.3.210.0070.01016.23
7.3.200.0100.01016.05
7.3.190.0040.01116.27
7.3.180.0090.00616.14
7.3.170.0060.01116.42
7.3.160.0060.00916.42
7.3.120.0070.00914.92
7.3.110.0060.00314.76
7.3.100.0110.00014.70
7.3.90.0080.00614.50
7.3.80.0070.01114.73
7.3.70.0030.00614.76
7.3.60.0040.01114.85
7.3.50.0060.01014.52
7.3.40.0060.00614.16
7.3.30.0100.00314.77
7.3.20.0060.00916.51
7.3.10.0000.01316.57
7.3.00.0000.00916.29
7.2.330.0070.01116.58
7.2.320.0130.00316.31
7.2.310.0140.00716.60
7.2.300.0080.00816.55
7.2.290.0030.01516.46
7.2.250.0100.01014.84
7.2.240.0130.00714.54
7.2.230.0070.00714.96
7.2.220.0030.01315.14
7.2.210.0040.01114.39
7.2.200.0040.00814.64
7.2.190.0070.00714.93
7.2.180.0120.00314.79
7.2.170.0120.00314.91
7.2.00.0040.00819.22
7.1.330.0140.00015.56
7.1.320.0000.01315.69
7.1.310.0070.00715.75
7.1.300.0000.00915.67
7.1.290.0040.00415.58
7.1.280.0100.00315.69
7.1.270.0090.00315.50
7.1.260.0040.00815.38
7.1.100.0000.01217.92
7.1.70.0060.00616.61
7.1.60.0060.01919.40
7.1.50.0290.01334.69
7.1.00.0000.06722.40
7.0.200.0030.00816.48
7.0.140.0070.07322.00
7.0.120.0030.06322.01
7.0.60.0070.04020.09
7.0.50.0070.08017.93
7.0.40.0070.08020.27
7.0.30.0270.08020.19
7.0.20.0230.06020.23
7.0.10.0330.04720.20
7.0.00.0130.08020.20
5.6.280.0100.06720.86
5.6.210.0130.06020.70
5.6.200.0130.07318.16
5.6.190.0130.04720.33
5.6.180.0230.08020.53
5.6.170.0370.04020.71
5.6.160.0030.04020.44
5.6.150.0030.05318.30
5.6.140.0170.06018.21
5.6.130.0170.07318.24
5.6.120.0100.04320.99
5.6.110.0070.06021.04
5.6.100.0130.05321.15
5.6.90.0130.06021.14
5.6.80.0070.08320.39
5.6.70.0270.06320.41
5.5.350.0300.07720.45
5.5.340.0130.07717.95
5.5.330.0100.05320.41
5.5.320.0030.06020.43
5.5.310.0330.07320.38
5.5.300.0130.06017.96
5.5.290.0000.04318.04
5.5.280.0100.08320.74
5.5.270.0100.06320.66
5.5.260.0130.07720.84
5.5.250.0000.07320.59
5.5.240.0070.08020.20
5.4.450.0030.06319.45
5.4.440.0100.05319.49
5.4.430.0070.04719.44
5.4.420.0070.04719.48
5.4.410.0070.07019.29
5.4.400.0030.08318.92
5.4.390.0030.05319.14
5.4.380.0130.07318.87
5.4.370.0070.06718.86
5.4.360.0000.05718.93
5.4.350.0070.07319.25
5.4.340.0130.07018.97
5.4.320.0070.06319.12
5.4.310.0130.06719.15
5.4.300.0070.05018.94
5.4.290.0030.04719.20
5.4.280.0130.06719.26
5.4.270.0100.05019.14
5.4.260.0130.05018.85
5.4.250.0070.08019.24
5.4.240.0070.03719.14
5.4.230.0100.06719.01
5.4.220.0100.07319.00
5.4.210.0030.06719.14
5.4.200.0030.07319.20
5.4.190.0070.04719.22
5.4.180.0100.06318.97
5.4.170.0100.03318.99
5.4.160.0030.05318.85
5.4.150.0130.06319.13
5.4.140.0000.07716.36
5.4.130.0070.04716.51
5.4.120.0000.08016.58
5.4.110.0030.03716.33
5.4.100.0030.04016.34
5.4.90.0030.03716.48
5.4.80.0030.04716.41
5.4.70.0030.07716.42
5.4.60.0070.07716.27
5.4.50.0030.05316.35
5.4.40.0070.07716.46
5.4.30.0100.07016.46
5.4.20.0000.04716.40
5.4.10.0100.07016.25
5.4.00.0100.06715.71
5.3.290.0100.05314.60
5.3.280.0130.03314.51
5.3.270.0030.08014.57
5.3.260.0000.08714.69
5.3.250.0100.03014.55
5.3.240.0000.08014.53
5.3.230.0070.05014.38
5.3.220.0100.03714.49
5.3.210.0130.03014.46
5.3.200.0000.04014.50
5.3.190.0070.08714.54
5.3.180.0100.07014.48
5.3.170.0070.07714.52
5.3.160.0070.07714.65
5.3.150.0100.07014.53
5.3.140.0000.05714.52
5.3.130.0030.04314.44
5.3.120.0100.06014.56
5.3.110.0170.03314.33
5.3.100.0100.05313.97
5.3.90.0100.05713.81
5.3.80.0000.05013.95
5.3.70.0030.05313.83
5.3.60.0070.04013.92
5.3.50.0000.04013.95
5.3.40.0000.08013.95
5.3.30.0070.08013.74
5.3.20.0000.05313.70
5.3.10.0030.03713.61
5.3.00.0030.03713.57
5.2.170.0030.03011.04
5.2.160.0030.03311.13
5.2.150.0070.03011.07
5.2.140.0030.04311.04
5.2.130.0030.05011.03
5.2.120.0070.04011.09
5.2.110.0000.04010.98
5.2.100.0170.05010.99
5.2.90.0100.03311.04
5.2.80.0030.04011.07
5.2.70.0130.02310.95
5.2.60.0000.07011.03
5.2.50.0030.06310.86
5.2.40.0070.05710.84
5.2.30.0030.06710.91
5.2.20.0030.03310.85
5.2.10.0030.04710.94
5.2.00.0100.02710.88
5.1.60.0000.0339.95
5.1.50.0000.02710.06
5.1.40.0030.0279.92
5.1.30.0000.03010.34
5.1.20.0030.06010.34
5.1.10.0030.03710.07
5.1.00.0030.03310.04
5.0.50.0070.0208.38
5.0.40.0070.0338.42
5.0.30.0000.0408.22
5.0.20.0070.0338.15
5.0.10.0030.0238.06
5.0.00.0000.0408.10
4.4.90.0000.0307.79
4.4.80.0000.0337.79
4.4.70.0000.0377.79
4.4.60.0000.0407.79
4.4.50.0000.0337.79
4.4.40.0000.0307.79
4.4.30.0000.0207.79
4.4.20.0000.0237.79
4.4.10.0030.0307.79
4.4.00.0030.0277.79
4.3.110.0000.0207.79
4.3.100.0000.0207.79
4.3.90.0030.0137.79
4.3.80.0000.0537.79
4.3.70.0030.0337.79
4.3.60.0030.0237.79
4.3.50.0100.0177.79
4.3.40.0030.0577.79
4.3.30.0000.0277.79
4.3.20.0030.0337.79
4.3.10.0030.0337.79
4.3.00.0000.0237.79

preferences:
39.55 ms | 401 KiB | 5 Q