3v4l.org

run code in 300+ PHP versions simultaneously
<?php // plugin_portswitch -> PluginPortswitchPortswitch // + extends CommonDBTM class PluginPortswitchPortswitch extends CommonDBTM { public static $config_data; public static function loadConfig() { self::$config_data = parse_ini_file(GLPI_ROOT."/files/_plugins/portswitch/config.ini", true); } public static function drawInfoBox() { include_once(GLPI_ROOT."/inc/includes.php"); if(Session::haveRight("user", "w")) { echo "<tr><td class='top' width='450px'>"; echo "<br><table class='tab_cadrehov'><tr><th colspan=\"4\"><a href=\"/glpi/plugins/portswitch/\">Portswitch</a></th></tr>"; echo "<tr><th>Bezeichnung</th><th>Status</th></tr>"; self::loadConfig(); for($i = 0; $i < sizeof(self::$config_data); $i++) { echo "<tr><center>"; if(self::$config_data[$i]['status'] == "Aktiviert") { echo "<td>".self::$config_data[$i]['name']."</td><td>".self::getHtmlStatus($i)." ( "; $kommentar_array = explode(",", self::$config_data[$i]['kommentar']); for($j = 0; $j < sizeof($kommentar_array); $j++) echo "<a href=\"/glpi/front/ticket.form.php?id=".$kommentar_array[$j]."\"> #".$kommentar_array[$j]."</a>"; echo " ) </td>"; } else { echo "<td>".self::$config_data[$i]['name']."</td><td>".self::getHtmlStatus($i)."</td>"; } echo "</tr></center>"; } echo "</table>"; echo "</td></tr>"; } } public static function getHtmlStatus($id) { if(self::$config_data[$id]['status'] == "Aktiviert") return "<font color=\"#00FF00\">Aktiv</font>"; else if(self::$config_data[$id]['status'] == "Deaktiviert") return "<font color=\"#FF0000\">Inaktiv</font>"; else return "<font color=\"#0000FF\">Unbekannt</font>"; } public static function saveConfig() { $config_file = fopen(GLPI_ROOT."/files/_plugins/portswitch/config.ini", 'w'); if($config_file == false) die("Konnte ".GLPI_ROOT."/files/_plugins/portswitch/config.ini nicht schreiben."); for($i = 0; $i < sizeof(self::$config_data); $i++) { fwrite($config_file, "[$i]\n"); fwrite($config_file, "name = \"".self::$config_data[$i]['name']."\"\n"); fwrite($config_file, "ip = \"".self::$config_data[$i]['ip']."\"\n"); fwrite($config_file, "port = \"".self::$config_data[$i]['port']."\"\n"); fwrite($config_file, "kommentar = \"".self::$config_data[$i]['kommentar']."\"\n"); fwrite($config_file, "status = \"".self::$config_data[$i]['status']."\"\n"); fwrite($config_file, "passwort = \"".self::$config_data[$i]['passwort']."\"\n"); fwrite($config_file, "stack = \"".self::$config_data[$i]['stack']."\"\n"); fwrite($config_file, "hostname = \"".self::$config_data[$i]['hostname']."\"\n"); fwrite($config_file, "link = \"".self::$config_data[$i]['link']."\"\n\n"); } fclose($config_file); } }; ?>

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.0130.01016.73
8.3.50.0150.00521.98
8.3.40.0120.00318.98
8.3.30.0100.00319.14
8.3.20.0070.01020.34
8.3.10.0040.00423.70
8.3.00.0070.01019.14
8.2.180.0040.01118.43
8.2.170.0120.00422.96
8.2.160.0040.01120.47
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0080.00020.72
8.2.110.0030.00720.32
8.2.100.0120.00017.84
8.2.90.0050.00317.84
8.2.80.0080.00017.97
8.2.70.0030.00717.63
8.2.60.0030.01018.04
8.2.50.0030.00618.07
8.2.40.0040.00418.16
8.2.30.0000.00818.05
8.2.20.0050.00317.88
8.2.10.0040.00418.08
8.2.00.0070.00017.69
8.1.280.0130.00325.92
8.1.270.0100.00723.97
8.1.260.0080.00026.35
8.1.250.0000.00828.09
8.1.240.0090.00022.48
8.1.230.0040.00822.81
8.1.220.0000.01017.74
8.1.210.0090.00318.77
8.1.200.0100.00017.36
8.1.190.0000.00817.35
8.1.180.0030.00518.10
8.1.170.0030.00618.97
8.1.160.0070.00018.88
8.1.150.0040.00418.77
8.1.140.0020.00517.29
8.1.130.0000.00717.76
8.1.120.0070.00017.35
8.1.110.0000.00717.42
8.1.100.0060.00317.50
8.1.90.0040.00417.48
8.1.80.0050.00317.48
8.1.70.0030.00317.43
8.1.60.0000.00817.47
8.1.50.0050.00317.49
8.1.40.0060.00317.42
8.1.30.0040.00717.57
8.1.20.0030.00517.64
8.1.10.0000.00817.49
8.1.00.0030.00617.47
8.0.300.0040.00419.98
8.0.290.0080.00017.00
8.0.280.0040.00418.49
8.0.270.0000.00717.23
8.0.260.0030.00317.32
8.0.250.0030.00317.05
8.0.240.0030.00517.07
8.0.230.0070.00017.05
8.0.220.0030.00317.04
8.0.210.0030.00316.88
8.0.200.0000.00717.06
8.0.190.0050.00516.95
8.0.180.0000.00717.11
8.0.170.0040.00416.95
8.0.160.0040.00417.03
8.0.150.0040.00416.84
8.0.140.0000.00717.01
8.0.130.0000.00613.48
8.0.120.0000.00816.96
8.0.110.0070.00016.93
8.0.100.0080.00016.90
8.0.90.0040.00416.92
8.0.80.0000.01516.95
8.0.70.0070.00017.08
8.0.60.0040.00416.97
8.0.50.0000.00717.04
8.0.30.0180.01017.17
8.0.20.0140.00517.40
8.0.10.0040.00417.13
8.0.00.0120.00616.75
7.4.330.0000.00515.09
7.4.320.0030.00316.54
7.4.300.0000.00916.49
7.4.290.0040.00416.65
7.4.280.0000.00816.58
7.4.270.0030.00316.48
7.4.260.0000.00716.52
7.4.250.0020.00516.60
7.4.240.0030.00516.55
7.4.230.0000.00716.67
7.4.220.0040.01516.63
7.4.210.0060.01116.61
7.4.200.0000.00716.68
7.4.190.0000.00816.75
7.4.160.0130.00316.66
7.4.150.0170.00717.40
7.4.140.0120.00617.86
7.4.130.0110.00916.50
7.4.120.0110.01016.53
7.4.110.0120.01216.51
7.4.100.0060.01216.44
7.4.90.0130.00616.62
7.4.80.0100.01019.39
7.4.70.0160.00316.79
7.4.60.0030.01316.45
7.4.50.0000.00516.54
7.4.40.0190.00416.60
7.4.30.0040.01116.45
7.4.00.0000.01614.61
7.3.330.0000.00613.36
7.3.320.0050.00013.11
7.3.310.0030.00316.30
7.3.300.0030.00316.39
7.3.290.0070.00716.27
7.3.280.0100.00816.36
7.3.270.0120.00517.40
7.3.260.0130.00316.36
7.3.250.0110.01016.48
7.3.240.0100.00716.32
7.3.230.0030.01316.39
7.3.210.0130.00316.38
7.3.200.0000.01719.39
7.3.190.0140.00416.39
7.3.180.0120.00616.40
7.3.170.0100.01116.59
7.3.160.0110.00416.35
7.3.120.0080.00314.88
7.3.10.0060.00616.42
7.3.00.0070.01016.42
7.2.330.0030.01416.58
7.2.320.0100.00716.59
7.2.310.0140.00616.46
7.2.300.0130.01016.67
7.2.290.0100.01016.61
7.2.130.0090.00616.27
7.2.120.0180.00716.59
7.2.110.0060.00616.59
7.2.100.0080.00516.38
7.2.90.0060.00616.30
7.2.80.0100.00616.50
7.2.70.0030.00916.58
7.2.60.0050.01116.64
7.2.50.0150.00316.63
7.2.40.0060.00616.55
7.2.30.0150.00316.43
7.2.20.0110.00816.71
7.2.10.0000.01616.32
7.2.00.0050.01118.04
7.1.250.0060.00615.29
7.1.200.0070.00315.59
7.1.100.0180.01417.97
7.1.70.0060.00816.68
7.1.60.0110.01419.46
7.1.50.0070.01416.50
7.1.00.0000.08022.35
7.0.200.0000.00716.57
7.0.140.0030.07722.10
7.0.60.0100.08020.00
7.0.50.0130.04317.95
7.0.40.0070.07019.98
7.0.30.0230.08320.09
7.0.20.0300.05020.18
7.0.10.0100.05320.12
7.0.00.0070.04020.09
5.6.280.0000.07721.14
5.6.210.0130.07320.64
5.6.200.0030.04318.21
5.6.190.0100.04020.61
5.6.180.3500.03320.46
5.6.170.0270.06020.47
5.6.160.0100.05320.52
5.6.150.0100.05718.25
5.6.140.0100.04718.37
5.6.130.0030.04018.18
5.6.120.0070.04721.07
5.6.110.0070.08321.01
5.6.100.0070.08021.11
5.6.90.0070.08021.04
5.6.80.0030.05020.43
5.6.70.3270.03320.50
5.5.350.0300.07320.46
5.5.340.0000.04317.95
5.5.330.0070.08320.43
5.5.320.0230.04320.36
5.5.310.0200.04320.28
5.5.300.0000.06718.01
5.5.290.0030.06017.95
5.5.280.0000.08720.91
5.5.270.0100.07720.89
5.5.260.0100.07320.87
5.5.250.0070.07720.82
5.5.240.0230.06020.39
5.4.450.0930.05719.18
5.4.440.0670.05019.18
5.4.430.0170.05019.22
5.4.420.0070.05719.42
5.4.410.0030.06318.70
5.4.400.0230.04018.90
5.4.390.0170.04318.56
5.4.380.0100.05318.75
5.4.370.0030.04718.72
5.4.360.0070.04318.59
5.4.350.0050.03812.05
5.4.340.0100.03912.04
5.4.320.0060.03912.52
5.4.310.0060.04112.52
5.4.300.0060.03612.53
5.4.290.0080.04412.52
5.4.280.0090.03912.42
5.4.270.0120.05712.42
5.4.260.0090.03812.42
5.4.250.0050.04212.43
5.4.240.0120.03912.43
5.4.230.0080.04112.41
5.4.220.0090.03812.41
5.4.210.0080.04512.41
5.4.200.0120.05112.42
5.4.190.0110.05712.41
5.4.180.0110.07012.41
5.4.170.0100.05312.42
5.4.160.0090.04912.41
5.4.150.0040.05412.42
5.4.140.0030.05912.10
5.4.130.0080.04012.08
5.4.120.0080.03812.04
5.4.110.0070.05512.04
5.4.100.0060.06212.04
5.4.90.0140.07312.04
5.4.80.0080.06112.04
5.4.70.0070.05712.04
5.4.60.0120.05312.03
5.4.50.0080.05612.03
5.4.40.0080.05412.02
5.4.30.0080.05812.02
5.4.20.0090.05212.02
5.4.10.0060.05312.02
5.4.00.0070.05111.50
5.3.290.0040.04612.80
5.3.280.0150.06512.71
5.3.270.0120.05512.72
5.3.260.0090.05712.72
5.3.250.0110.06512.72
5.3.240.0130.05712.72
5.3.230.0080.05312.71
5.3.220.0080.05212.68
5.3.210.0090.05412.68
5.3.200.0080.05312.68
5.3.190.0190.07012.68
5.3.180.0090.05312.68
5.3.170.0080.05212.68
5.3.160.0050.05012.68
5.3.150.0060.06012.68
5.3.140.0070.05412.67
5.3.130.0130.04412.66
5.3.120.0100.03712.66
5.3.110.0060.04512.66
5.3.100.0090.04212.16
5.3.90.0040.05212.14
5.3.80.0080.03912.13
5.3.70.0070.04112.13
5.3.60.0120.05112.12
5.3.50.0060.05912.06
5.3.40.0060.03712.06
5.3.30.0050.03512.02
5.3.20.0080.03311.80
5.3.10.0060.03511.77
5.3.00.0100.03311.75
5.2.170.0060.0299.26
5.2.160.0070.0279.26
5.2.150.0040.0329.26
5.2.140.0070.0339.25
5.2.130.0080.0409.22
5.2.120.0070.0279.21
5.2.110.0050.0389.22
5.2.100.0080.0339.22
5.2.90.0040.0349.22
5.2.80.0040.0369.21
5.2.70.0050.0359.21
5.2.60.0130.0429.16
5.2.50.0090.0349.13
5.2.40.0090.0319.11
5.2.30.0060.0319.09
5.2.20.0040.0299.07
5.2.10.0040.0378.98
5.2.00.0040.0328.84
5.1.60.0120.0298.13
5.1.50.0050.0278.13
5.1.40.0020.0288.11
5.1.30.0050.0398.46
5.1.20.0060.0268.48
5.1.10.0060.0268.20
5.1.00.0020.0318.20
5.0.50.0070.0186.69
5.0.40.0020.0236.55
5.0.30.0060.0336.36
5.0.20.0040.0216.32
5.0.10.0040.0206.31
5.0.00.0020.0336.30
4.4.90.0020.0174.78
4.4.80.0030.0164.75
4.4.70.0030.0224.76
4.4.60.0060.0144.75
4.4.50.0010.0214.77
4.4.40.0040.0344.71
4.4.30.0050.0194.76
4.4.20.0050.0204.85
4.4.10.0020.0224.85
4.4.00.0050.0264.76
4.3.110.0020.0214.67
4.3.100.0020.0204.67
4.3.90.0060.0154.63
4.3.80.0040.0244.59
4.3.70.0030.0164.63
4.3.60.0040.0164.63
4.3.50.0040.0154.63
4.3.40.0020.0254.54
4.3.30.0020.0163.30
4.3.20.0020.0173.28
4.3.10.0030.0163.23
4.3.00.0000.0276.68

preferences:
51.27 ms | 401 KiB | 5 Q