3v4l.org

run code in 300+ PHP versions simultaneously
<?php if(!defined('GLPI_ROOT')) { die("Sorry. You can't access directly to this file"); } // 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.0150.00016.50
8.3.50.0110.00922.12
8.3.40.0120.00318.70
8.3.30.0070.00719.04
8.3.20.0000.01620.07
8.3.10.0030.00523.65
8.3.00.0050.00319.21
8.2.180.0120.00318.41
8.2.170.0210.00022.96
8.2.160.0110.00420.52
8.2.150.0030.00524.18
8.2.140.0080.00024.66
8.2.130.0040.00426.16
8.2.120.0040.00420.85
8.2.110.0060.00322.30
8.2.100.0070.00418.03
8.2.90.0060.00319.17
8.2.80.0040.00417.97
8.2.70.0080.00017.75
8.2.60.0050.00317.92
8.2.50.0060.00318.07
8.2.40.0000.00819.88
8.2.30.0040.00419.91
8.2.20.0050.00317.88
8.2.10.0000.00818.25
8.2.00.0000.00717.82
8.1.280.0130.00325.92
8.1.270.0110.00823.82
8.1.260.0050.00326.35
8.1.250.0080.00028.09
8.1.240.0070.00323.81
8.1.230.0040.00719.28
8.1.220.0000.00817.74
8.1.210.0070.00318.77
8.1.200.0040.00817.35
8.1.190.0000.00817.35
8.1.180.0000.00818.10
8.1.170.0080.00018.76
8.1.160.0040.00422.12
8.1.150.0040.00418.66
8.1.140.0060.00317.38
8.1.130.0030.00317.79
8.1.120.0040.00417.42
8.1.110.0000.00717.38
8.1.100.0040.00417.41
8.1.90.0040.00417.48
8.1.80.0000.00917.29
8.1.70.0050.00217.37
8.1.60.0040.00417.48
8.1.50.0030.00617.46
8.1.40.0050.00317.54
8.1.30.0000.01017.62
8.1.20.0020.00517.61
8.1.10.0050.00317.41
8.1.00.0040.00417.42
8.0.300.0060.00318.77
8.0.290.0000.00717.30
8.0.280.0030.00318.36
8.0.270.0030.00417.24
8.0.260.0070.00017.27
8.0.250.0040.00417.08
8.0.240.0000.00816.98
8.0.230.0030.00317.05
8.0.220.0000.00716.96
8.0.210.0070.00016.97
8.0.200.0000.00716.90
8.0.190.0020.00516.91
8.0.180.0040.00416.97
8.0.170.0000.00816.99
8.0.160.0040.00416.81
8.0.150.0040.00416.85
8.0.140.0000.00716.87
8.0.130.0000.00613.39
8.0.120.0000.00816.91
8.0.110.0040.00417.00
8.0.100.0050.00316.94
8.0.90.0040.00416.81
8.0.80.0030.01216.95
8.0.70.0000.00716.86
8.0.60.0000.00717.00
8.0.50.0040.00416.86
8.0.30.0090.01417.27
8.0.20.0140.00517.40
8.0.10.0000.00717.00
8.0.00.0120.00916.88
7.4.330.0000.00515.09
7.4.320.0000.00616.52
7.4.300.0030.00616.43
7.4.290.0050.00316.55
7.4.280.0040.00416.59
7.4.270.0000.00716.52
7.4.260.0040.00416.61
7.4.250.0050.00316.45
7.4.240.0060.00216.44
7.4.230.0000.00716.62
7.4.220.0120.00616.38
7.4.210.0080.00716.46
7.4.200.0050.00316.32
7.4.190.0000.00716.26
7.4.160.0090.00616.49
7.4.150.0100.00717.40
7.4.140.0050.01217.86
7.4.130.0150.00616.55
7.4.120.0080.01016.49
7.4.110.0200.00416.23
7.4.100.0070.01116.61
7.4.90.0130.00616.41
7.4.80.0040.01519.39
7.4.70.0100.00716.52
7.4.60.0070.01016.54
7.4.50.0020.00216.20
7.4.40.0110.00816.55
7.4.30.0100.00716.39
7.4.00.0030.01214.81
7.3.330.0000.00613.28
7.3.320.0030.00213.10
7.3.310.0050.00316.10
7.3.300.0000.00716.14
7.3.290.0070.00716.31
7.3.280.0080.01316.28
7.3.270.0140.00317.40
7.3.260.0060.01216.50
7.3.250.0100.01116.45
7.3.240.0100.01316.28
7.3.230.0140.00316.44
7.3.210.0100.00716.21
7.3.200.0100.00719.39
7.3.190.0090.00916.40
7.3.180.0100.01316.31
7.3.170.0060.01016.40
7.3.160.0040.01216.34
7.3.120.0020.01214.78
7.3.110.0080.00914.89
7.3.100.0060.01014.56
7.3.90.0080.00614.76
7.3.80.0050.01114.66
7.3.70.0000.01314.55
7.3.60.0050.01014.71
7.3.50.0060.00814.78
7.3.40.0030.00914.62
7.3.30.0050.01014.64
7.3.20.0030.00816.48
7.3.10.0090.00616.59
7.3.00.0050.00816.60
7.2.330.0090.00916.57
7.2.320.0070.01016.64
7.2.310.0130.01016.57
7.2.300.0080.01116.56
7.2.290.0140.00816.50
7.2.240.0070.01014.96
7.2.230.0030.01214.91
7.2.220.0000.01414.96
7.2.210.0070.00814.83
7.2.200.0090.00514.78
7.2.190.0050.00814.85
7.2.180.0060.00815.10
7.2.170.0050.01115.13
7.2.160.0020.01414.72
7.2.150.0090.00316.85
7.2.140.0050.01016.85
7.2.130.0060.00816.82
7.2.120.0080.00716.83
7.2.110.0080.01116.75
7.2.100.0050.00916.76
7.2.90.0090.00516.79
7.2.80.0030.00916.87
7.2.70.0080.00616.66
7.2.60.0040.00716.81
7.2.50.0070.00916.67
7.2.40.0070.00816.85
7.2.30.0060.00916.83
7.2.20.0040.00816.65
7.2.10.0030.01016.83
7.2.00.0070.00816.69
7.1.330.0060.00715.72
7.1.320.0050.00915.62
7.1.310.0050.00715.76
7.1.300.0070.00715.73
7.1.290.0090.00315.61
7.1.280.0090.00515.74
7.1.270.0050.00515.74
7.1.260.0060.00815.54
7.1.250.0070.00615.70
7.1.240.0090.00415.65
7.1.230.0100.00015.64
7.1.220.0030.01315.67
7.1.210.0040.00815.46
7.1.200.0190.00615.55
7.1.190.0000.01015.86
7.1.180.0000.01015.88
7.1.170.0040.01115.48
7.1.160.0000.00815.62
7.1.150.0030.00715.49
7.1.140.0030.00715.73
7.1.130.0070.00715.80
7.1.120.0030.01015.72
7.1.110.0070.00715.60
7.1.100.0060.00615.38
7.1.90.0000.00815.75
7.1.80.0040.00415.45
7.1.70.0000.00916.27
7.1.60.0090.01117.54
7.1.50.0030.01216.38
7.1.40.0030.00715.52
7.1.30.0120.00315.61
7.1.20.0090.00315.79
7.1.10.0070.00315.62
7.1.00.0020.04318.96
7.0.330.0030.00715.31
7.0.320.0060.00315.42
7.0.310.0030.01315.38
7.0.300.0040.00415.25
7.0.290.0000.01415.25
7.0.280.0030.00915.17
7.0.270.0090.00615.02
7.0.260.0040.00415.48
7.0.250.0060.00615.15
7.0.240.0060.00615.35
7.0.230.0030.01015.33
7.0.220.0060.00615.26
7.0.210.0060.00615.34
7.0.200.0040.00516.02
7.0.190.0040.00715.42
7.0.180.0050.00515.45
7.0.170.0000.01115.11
7.0.160.0060.00715.05
7.0.150.0070.00715.16
7.0.140.0050.03818.67
7.0.130.0080.00415.30
7.0.120.0060.00315.57
7.0.110.0040.01115.48
7.0.100.0060.00615.39
7.0.90.0000.00915.05
7.0.80.0040.01115.41
7.0.70.0000.01415.55
7.0.60.0090.04017.58
7.0.50.0100.04116.67
7.0.40.0070.04516.56
7.0.30.0130.02516.73
7.0.20.0230.03616.77
7.0.10.0070.04216.62
7.0.00.0030.02716.75
5.6.380.0030.00714.55
5.6.370.0070.00414.54
5.6.360.0070.00714.41
5.6.350.0030.00614.29
5.6.340.0000.00914.27
5.6.330.0070.00714.11
5.6.320.0090.00014.61
5.6.310.0100.00014.57
5.6.300.0000.01514.29
5.6.290.0000.01514.30
5.6.280.0050.04017.68
5.6.270.0030.01314.32
5.6.260.0120.00314.07
5.6.250.0040.01114.50
5.6.240.0000.01414.40
5.6.230.0000.01214.11
5.6.220.0000.01314.58
5.6.210.0050.02617.46
5.6.200.0080.02516.24
5.6.190.0020.03017.38
5.6.180.1720.01917.54
5.6.170.0100.02517.24
5.6.160.0050.02717.37
5.6.150.0070.04716.14
5.6.140.0030.02916.30
5.6.130.0050.04816.31
5.6.120.0000.03217.79
5.6.110.0080.04017.67
5.6.100.0100.04217.63
5.6.90.0100.04117.71
5.6.80.0130.03717.29
5.6.70.2430.02017.40
5.6.60.0030.00714.01
5.6.50.0040.00814.07
5.6.40.0060.00314.45
5.6.30.0080.00014.18
5.6.20.0040.00814.13
5.6.10.0000.01314.44
5.6.00.0060.00614.42
5.5.380.0030.01011.10
5.5.370.0030.00711.28
5.5.360.0030.00711.13
5.5.350.0080.03815.75
5.5.340.0050.02314.52
5.5.330.0100.04215.60
5.5.320.0200.04015.71
5.5.310.0180.03815.73
5.5.300.0130.03014.56
5.5.290.0050.04514.68
5.5.280.0070.04516.05
5.5.270.0050.04416.02
5.5.260.0050.02815.98
5.5.250.0030.03615.85
5.5.240.0070.03815.63
5.5.230.0030.00910.71
5.5.220.0060.00011.10
5.5.210.0050.00210.91
5.5.200.0000.00910.92
5.5.190.0060.00611.04
5.5.180.0030.00611.06
5.5.170.0110.00411.16
5.5.160.0030.00310.82
5.5.150.0030.00710.59
5.5.140.0060.00611.20
5.5.130.0040.00711.17
5.5.120.0040.00710.98
5.5.110.0000.00911.09
5.5.100.0050.00510.97
5.5.90.0030.00611.20
5.5.80.0040.00410.73
5.5.70.0040.00410.88
5.5.60.0040.01111.16
5.5.50.0030.00711.02
5.5.40.0030.00310.86
5.5.30.0030.00810.75
5.5.20.0080.00011.00
5.5.10.0000.00811.11
5.5.00.0030.00611.02
5.4.450.0150.03015.21
5.4.440.0120.02915.26
5.4.430.0130.04115.31
5.4.420.0140.03615.27
5.4.410.0130.02915.04
5.4.400.0120.03114.93
5.4.390.0170.04514.96
5.4.380.0160.02815.02
5.4.370.0150.02014.93
5.4.360.0120.02215.06
5.4.350.0130.02314.90
5.4.340.0160.02315.01
5.4.330.0000.01010.87
5.4.320.0120.02915.00
5.4.310.0120.02215.10
5.4.300.0180.01515.04
5.4.290.0130.02014.97
5.4.280.0130.02415.02
5.4.270.0080.02614.97
5.4.260.0120.02215.00
5.4.250.0150.03815.00
5.4.240.0160.02015.12
5.4.230.0110.02115.15
5.4.220.0200.02215.06
5.4.210.0080.02515.10
5.4.200.0150.01714.81
5.4.190.0100.02315.04
5.4.180.0150.03815.00
5.4.170.0100.02414.87
5.4.160.0150.01714.86
5.4.150.0140.02315.12
5.4.140.0180.02013.60
5.4.130.0210.01313.70
5.4.120.0200.01713.74
5.4.110.0080.02413.59
5.4.100.0120.02513.83
5.4.90.0150.02813.63
5.4.80.0140.01913.53
5.4.70.0090.02413.68
5.4.60.0120.02013.69
5.4.50.0080.02213.51
5.4.40.0130.01913.75
5.4.30.0130.01813.56
5.4.20.0170.03413.52
5.4.10.0130.02513.65
5.4.00.0170.01813.26
5.3.290.0120.02212.61
5.3.280.0130.02112.58
5.3.270.0120.03612.65
5.3.260.0110.02312.48
5.3.250.0120.02212.66
5.3.240.0170.03412.62
5.3.230.0150.02112.58
5.3.220.0150.03212.47
5.3.210.0080.02512.47
5.3.200.0130.02112.48
5.3.190.0130.02312.55
5.3.180.0150.02712.54
5.3.170.0130.03312.56
5.3.160.0120.03012.58
5.3.150.0120.02012.48
5.3.140.0130.02512.57
5.3.130.0120.04412.52
5.3.120.0100.02312.61
5.3.110.0130.02312.63
5.3.100.0150.02512.33
5.3.90.0160.02612.30
5.3.80.0100.02412.29
5.3.70.0120.01912.25
5.3.60.0130.01912.29
5.3.50.0130.01812.22
5.3.40.0130.02212.13
5.3.30.0110.02612.06
5.3.20.0130.03512.14
5.3.10.0120.01812.10
5.3.00.0120.02011.92
5.2.170.0110.01810.36
5.2.160.0130.01510.44
5.2.150.0160.01310.31
5.2.140.0180.02510.46
5.2.130.0120.01810.28
5.2.120.0130.01510.39
5.2.110.0100.01810.34
5.2.100.0160.02610.35
5.2.90.0080.02010.31
5.2.80.0050.02010.26
5.2.70.0100.02310.25
5.2.60.0100.01710.12
5.2.50.0080.02010.22
5.2.40.0070.02010.13
5.2.30.0080.01810.31
5.2.20.0110.01310.14
5.2.10.0080.0169.86
5.2.00.0070.0169.88
5.1.60.0070.0199.64
5.1.50.0140.0109.65
5.1.40.0100.0129.53
5.1.30.0110.0139.74
5.1.20.0100.0299.52
5.1.10.0110.0139.67
5.1.00.0100.0139.52
5.0.50.0030.0129.52
5.0.40.0030.0129.52
5.0.30.0070.0179.52
5.0.20.0030.0169.52
5.0.10.0030.0139.52
5.0.00.0120.0139.52
4.4.90.0040.0089.52
4.4.80.0050.0089.52
4.4.70.0070.0079.52
4.4.60.0000.0129.52
4.4.50.0030.0109.52
4.4.40.0050.0149.52
4.4.30.0020.0119.52
4.4.20.0030.0109.52
4.4.10.0070.0129.52
4.4.00.0020.0139.52
4.3.110.0070.0109.52
4.3.100.0030.0209.52
4.3.90.0020.0119.52
4.3.80.0020.0199.52
4.3.70.0050.0189.52
4.3.60.0050.0089.52
4.3.50.0020.0129.52
4.3.40.0070.0279.52
4.3.30.0020.0219.52
4.3.20.0030.0109.52
4.3.10.0030.0109.52
4.3.00.0020.0129.52

preferences:
43.3 ms | 401 KiB | 5 Q