3v4l.org

run code in 300+ PHP versions simultaneously
<?php function get_likes_per_user($u_id, $force_db = false) { if ($this->memcache) { $u_id = intval($u_id); $key = 'liked_news_' . $u_id; $res = $this->memcache->get($key); if ($res != '') { $res = unserialize($res); } // This line causes a syntax error for no obvious reason if(!is_array($res) || $force_db){ $res = array(); $sql = "..."; $uu_query = $this->datenbank->query_result($sql); while ($row = $uu_query->fetch_row()) { $res[] = $row['uu_id']; } $this->memcache->set($key, serialize($res), 0, 3600); } return $res; } else { throw new Exception("Kein Memcache Objekt!"); } }

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.0150.00018.54
8.3.30.0100.00319.07
8.3.20.0000.00820.39
8.3.10.0000.00821.84
8.3.00.0040.00422.44
8.2.170.0090.00622.96
8.2.160.0140.00319.04
8.2.150.0110.00424.18
8.2.140.0040.00424.66
8.2.130.0160.00326.16
8.2.120.0030.00619.47
8.2.110.0080.00022.29
8.2.100.0030.00819.39
8.2.90.0000.00918.92
8.2.80.0000.00817.97
8.2.70.0000.00817.50
8.2.60.0000.00817.91
8.2.50.0000.01218.07
8.2.40.0080.00019.76
8.2.30.0070.00017.95
8.2.20.0080.00017.62
8.2.10.0030.00517.44
8.2.00.0040.00419.21
8.1.270.0050.00322.04
8.1.260.0050.00326.35
8.1.250.0070.00028.09
8.1.240.0000.00923.80
8.1.230.0060.00618.97
8.1.220.0040.00417.74
8.1.210.0000.00818.77
8.1.200.0030.00617.23
8.1.190.0030.00517.28
8.1.180.0000.00818.37
8.1.170.0000.00718.59
8.1.160.0080.00022.13
8.1.150.0000.00718.56
8.1.140.0080.00317.44
8.1.130.0000.00717.77
8.1.120.0030.00317.31
8.1.110.0020.00517.19
8.1.100.0030.00517.25
8.1.90.0040.00317.19
8.1.80.0030.00417.35
8.1.70.0000.00717.32
8.1.60.0030.00617.35
8.1.50.0040.00417.38
8.1.40.0030.00617.37
8.1.30.0030.00617.50
8.1.20.0000.00817.48
8.1.10.0050.00317.29
8.1.00.0070.00017.28
8.0.300.0050.00218.77
8.0.290.0040.00416.93
8.0.280.0040.00418.31
8.0.270.0040.00417.19
8.0.260.0080.00016.63
8.0.250.0030.00316.83
8.0.240.0030.00316.84
8.0.230.0030.00316.83
8.0.220.0000.00716.79
8.0.210.0000.00716.76
8.0.200.0030.00316.81
8.0.190.0000.00716.73
8.0.180.0030.00316.69
8.0.170.0050.00316.78
8.0.160.0070.00016.73
8.0.150.0040.00416.63
8.0.140.0040.00416.78
8.0.130.0000.00513.15
8.0.120.0040.00416.75
8.0.110.0040.00416.72
8.0.100.0000.00716.64
8.0.90.0000.00716.65
8.0.80.0040.01116.75
8.0.70.0000.00716.86
8.0.60.0040.00416.65
8.0.50.0000.00716.83
8.0.30.0100.00916.99
8.0.20.0100.01117.40
8.0.10.0040.00416.85
8.0.00.0100.00816.69
7.4.330.0000.00615.02
7.4.320.0000.00616.50
7.4.300.0070.00016.39
7.4.290.0000.00716.28
7.4.280.0000.00716.48
7.4.270.0030.00316.46
7.4.260.0030.00316.27
7.4.250.0070.00016.44
7.4.240.0020.00516.46
7.4.230.0000.00716.46
7.4.220.0110.00716.45
7.4.210.0040.01216.39
7.4.200.0080.00016.48
7.4.190.0070.00016.53
7.4.160.0100.00616.27
7.4.150.0100.01317.40
7.4.140.0110.00817.86
7.4.130.0080.01116.38
7.4.120.0120.00916.32
7.4.110.0100.00716.41
7.4.100.0070.01016.32
7.4.90.0130.00416.43
7.4.80.0100.00719.39
7.4.70.0060.01216.37
7.4.60.0030.01416.27
7.4.50.0030.00316.11
7.4.40.0090.00622.77
7.4.30.0090.00916.21
7.4.00.0030.01414.97
7.3.330.0000.00513.19
7.3.320.0000.00713.25
7.3.310.0000.00716.17
7.3.300.0000.00616.14
7.3.290.0030.01616.11
7.3.280.0080.00816.14
7.3.270.0200.00017.40
7.3.260.0080.00816.11
7.3.250.0070.01016.19
7.3.240.0100.01316.40
7.3.230.0120.00416.39
7.3.210.0080.00816.20
7.3.200.0090.01219.39
7.3.190.0060.01216.07
7.3.180.0060.01016.46
7.3.170.0100.00616.34
7.3.160.0090.00616.20
7.3.120.0060.01214.52
7.2.330.0100.00716.48
7.2.320.0030.01316.36
7.2.310.0080.00916.30
7.2.300.0030.01216.54
7.2.290.0160.00316.58
7.2.00.0070.01119.38
7.1.100.0030.00918.17
7.1.70.0040.00416.94
7.1.60.0130.00919.82
7.1.50.0030.00716.75
7.1.00.0070.07322.36
7.0.200.0070.00016.61
7.0.140.0000.07722.04
7.0.70.4300.04319.86
7.0.60.0070.03719.92
7.0.50.0070.07317.88
7.0.40.0030.07720.12
7.0.30.0200.03720.08
7.0.20.0270.08320.26
7.0.10.0270.05720.13
7.0.00.0100.04020.18
5.6.280.0030.07021.02
5.6.210.0070.08020.47
5.6.200.0070.06318.22
5.6.190.0070.08720.48
5.6.180.0230.05720.52
5.6.170.0570.06020.39
5.6.160.0070.09020.48
5.6.150.0170.02718.18
5.6.140.0100.07718.18
5.6.130.0030.06018.19
5.6.120.0030.04721.09
5.6.110.0030.04321.02
5.6.100.0030.09020.96
5.6.90.0070.04021.13
5.6.80.0070.05020.41
5.6.70.0270.07020.43
5.5.350.0130.07720.43
5.5.340.0100.04317.94
5.5.330.0000.04720.37
5.5.320.0030.08020.28
5.5.310.0330.07020.27
5.5.300.0070.03718.07
5.5.290.0000.08017.95
5.5.280.0000.09320.80
5.5.270.0100.08020.88
5.5.260.0100.08320.65
5.5.250.0100.07720.78
5.5.240.0070.04020.20
5.4.450.0170.06019.47
5.4.440.0070.06019.47
5.4.430.0800.05719.69
5.4.420.1200.06319.38
5.4.410.0200.04319.50
5.4.400.1000.05318.84
5.4.390.0970.05718.83
5.4.380.0230.05018.84
5.4.370.0070.04718.80
5.4.360.0130.03318.81
5.4.350.0040.03812.02
5.4.340.0090.04912.02
5.4.320.0100.03512.50
5.4.310.0060.04212.50
5.4.300.0040.04412.50
5.4.290.0040.04212.50
5.4.280.0100.03712.40
5.4.270.0100.03812.40
5.4.260.0130.07018.87
5.4.250.0070.07018.92
5.4.240.0030.05718.95
5.4.230.0130.05319.09
5.4.220.0170.05018.84
5.4.210.0170.04718.86
5.4.200.0130.04318.70
5.4.190.0070.08018.72
5.4.180.0070.05718.68
5.4.170.0270.04718.83
5.4.160.0100.07318.93
5.4.150.0030.05718.75
5.4.140.0170.04316.59
5.4.130.0070.05316.54
5.4.120.0070.04716.30
5.4.110.0130.04316.40
5.4.100.0070.05016.36
5.4.90.0130.04016.54
5.4.80.0100.04316.32
5.4.70.0030.05716.38
5.4.60.0170.04016.39
5.4.50.0030.05016.41
5.4.40.0030.05316.54
5.4.30.0170.05716.41
5.4.20.0130.04316.31
5.4.10.0130.04316.36
5.4.00.0030.05315.98
5.3.290.0070.04312.80
5.3.280.0070.05314.58
5.3.270.0100.06314.66
5.3.260.0130.07014.43
5.3.250.0100.07314.43
5.3.240.0070.07714.69
5.3.230.0070.05014.67
5.3.220.0130.04714.65
5.3.210.0030.05314.48
5.3.200.0070.05014.63
5.3.190.0130.06714.58
5.3.180.0030.05314.78
5.3.170.0070.05014.78
5.3.160.0030.05014.69
5.3.150.0070.05314.58
5.3.140.0130.05014.78
5.3.130.0170.04314.54
5.3.120.0100.05014.53
5.3.110.0070.05314.53
5.3.100.0030.05314.07
5.3.90.0100.04714.03
5.3.80.0070.05014.11
5.3.70.0070.05013.98
5.3.60.0030.05314.08
5.3.50.0100.04714.01
5.3.40.0100.04713.85
5.3.30.0130.06313.97
5.3.20.0030.05313.66
5.3.10.0130.04013.48
5.3.00.0170.06013.62
5.2.170.0030.06311.30
5.2.160.0030.04311.14
5.2.150.0000.05711.30
5.2.140.0130.03711.20
5.2.130.0100.05311.17
5.2.120.0100.03710.93
5.2.110.0100.03711.16
5.2.100.0070.03711.08
5.2.90.0030.04311.11
5.2.80.0070.04711.15
5.2.70.0070.04011.16
5.2.60.0130.04011.05
5.2.50.0070.04010.93
5.2.40.0030.05711.23
5.2.30.0030.04011.05
5.2.20.0100.03310.94
5.2.10.0100.03010.94
5.2.00.0030.04010.80
5.1.60.0070.0309.83
5.1.50.0000.04010.03
5.1.40.0030.0339.89
5.1.30.0030.03710.31
5.1.20.0000.04010.32
5.1.10.0070.04010.26
5.1.00.0030.03310.15
5.0.50.0030.0278.80
5.0.40.0100.0278.52
5.0.30.0000.0508.23
5.0.20.0000.0308.27
5.0.10.0100.0308.18
5.0.00.0000.0438.23
4.4.90.0030.0206.50
4.4.80.0000.0276.50
4.4.70.0070.0176.50
4.4.60.0070.0176.50
4.4.50.0030.0206.50
4.4.40.0070.0306.50
4.4.30.0000.0236.50
4.4.20.0030.0236.50
4.4.10.0170.0076.50
4.4.00.0000.0376.50
4.3.110.0070.0206.50
4.3.100.0000.0336.50
4.3.90.0000.0336.50
4.3.80.0100.0506.50
4.3.70.0070.0276.50
4.3.60.0030.0206.50
4.3.50.0030.0206.50
4.3.40.0000.0436.50
4.3.30.0030.0236.50
4.3.20.0030.0306.50
4.3.10.0000.0276.50
4.3.00.0030.0207.32

preferences:
38.29 ms | 400 KiB | 5 Q