3v4l.org

run code in 300+ PHP versions simultaneously
<?php define('GLPI_ROOT', '../../..'); include (GLPI_ROOT.'/inc/includes.php'); include_once('../inc/portswitch.class.php'); // Status aktualisieren if (isset($_SESSION['port_changed'])) { $changed = $_SESSION['port_changed']; unset($_SESSION['port_changed']); if(PluginPortswitchPortswitch::$config_data[$changed]['link'] != '0.0.0.0') { PluginPortswitchPortswitch::$config_data[$changed]['link'] = exec('../scripts/checkport.sh '.PluginPortswitchPortswitch::$config_data[$changed]['ip'].' '.PluginPortswitchPortswitch::$config_data[$changed]['port'].' '.PluginPortswitchPortswitch::$config_data[$changed]['passwort'].' '.PluginPortswitchPortswitch::$config_data[$changed]['stack'].' '.PluginPortswitchPortswitch::$config_data[$changed]['hostname']); } else { PluginPortswitchPortswitch::$config_data[$changed]['link'] = 'Konnte nicht abgefragt werden. (Konfiguration prüfen!)'; } PluginPortswitchPortswitch::saveConfig(); } for($i = 0; $i < sizeof(PluginPortswitchPortswitch::$config_data); $i++) { ?> <h1><?php echo PluginPortswitchPortswitch::$config_data[$i]['name']; ?> auf Switch <?php echo PluginPortswitchPortswitch::$config_data[$i]['hostname']; ?>:<?php echo PluginPortswitchPortswitch::$config_data[$i]['port']; ?> Kontrolle</h1> <form method="POST" action="<?php echo GLPI_ROOT; ?>/plugins/portswitch/front/portswitch.form.php"> <p> Ticketnummern (mit Komma trennen, z.B. <i>"1024,2048,..."</i>: <input type="text" name="kommentar" value="<?php echo PluginPortswitchPortswitch::$config_data[$i]['kommentar']; ?>"><br> <input type="submit" name="Aktualisieren" value="Aktualisieren"> </p> <p> <input type="hidden" name="sent" value="<?php echo $i; ?>"> <input type="submit" name="deactivate" value="Deaktivieren"> <input type="submit" name="activate" value="Aktivieren"> </p> <p>&nbsp;</p> <p> <?php switch(PluginPortswitchPortswitch::$config_data[$i]['link']) { case 'Down': $color = '#FF0000'; break; case 'Up': $color = '#00FF00'; break; default: $color = '#0000FF'; } ?> Port Link-Status: <span style="color:<?php echo $color; ?>"><?php echo PluginPortswitchPortswitch::$config_data[$i]['link']; ?></span><br> Port Status: <?php echo PluginPortswitchPortswitch::getHtmlStatus($i); ?><br><br> <input type="submit" name="link" value="Update Link Status"> </p> <?php Html::closeForm(); } ?>
Output for 8.0.0 - 8.0.12, 8.0.14 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.6
Warning: include(): open_basedir restriction in effect. File(../../../inc/includes.php) is not within the allowed path(s): (/tmp:/in:/etc) in /in/ebvU4 on line 3 Warning: include(../../../inc/includes.php): Failed to open stream: Operation not permitted in /in/ebvU4 on line 3 Warning: include(): Failed opening '../../../inc/includes.php' for inclusion (include_path='.:') in /in/ebvU4 on line 3 Warning: include_once(): open_basedir restriction in effect. File(../inc/portswitch.class.php) is not within the allowed path(s): (/tmp:/in:/etc) in /in/ebvU4 on line 4 Warning: include_once(../inc/portswitch.class.php): Failed to open stream: Operation not permitted in /in/ebvU4 on line 4 Warning: include_once(): Failed opening '../inc/portswitch.class.php' for inclusion (include_path='.:') in /in/ebvU4 on line 4 Fatal error: Uncaught Error: Class "PluginPortswitchPortswitch" not found in /in/ebvU4:21 Stack trace: #0 {main} thrown in /in/ebvU4 on line 21
Process exited with code 255.
Output for 8.0.13
Warning: include(../../../inc/includes.php): Failed to open stream: No such file or directory in /in/ebvU4 on line 3 Warning: include(): Failed opening '../../../inc/includes.php' for inclusion (include_path='.:') in /in/ebvU4 on line 3 Warning: include_once(../inc/portswitch.class.php): Failed to open stream: No such file or directory in /in/ebvU4 on line 4 Warning: include_once(): Failed opening '../inc/portswitch.class.php' for inclusion (include_path='.:') in /in/ebvU4 on line 4 Fatal error: Uncaught Error: Class "PluginPortswitchPortswitch" not found in /in/ebvU4:21 Stack trace: #0 {main} thrown in /in/ebvU4 on line 21
Process exited with code 255.
Output for 7.3.32 - 7.3.33, 7.4.33
Warning: include(../../../inc/includes.php): failed to open stream: No such file or directory in /in/ebvU4 on line 3 Warning: include(): Failed opening '../../../inc/includes.php' for inclusion (include_path='.:') in /in/ebvU4 on line 3 Warning: include_once(../inc/portswitch.class.php): failed to open stream: No such file or directory in /in/ebvU4 on line 4 Warning: include_once(): Failed opening '../inc/portswitch.class.php' for inclusion (include_path='.:') in /in/ebvU4 on line 4 Fatal error: Uncaught Error: Class 'PluginPortswitchPortswitch' not found in /in/ebvU4:21 Stack trace: #0 {main} thrown in /in/ebvU4 on line 21
Process exited with code 255.
Output for 7.0.0 - 7.0.33, 7.1.0 - 7.1.25, 7.2.0 - 7.2.33, 7.3.0 - 7.3.31, 7.4.0 - 7.4.32
Warning: include(): open_basedir restriction in effect. File(../../../inc/includes.php) is not within the allowed path(s): (/tmp:/in:/etc) in /in/ebvU4 on line 3 Warning: include(../../../inc/includes.php): failed to open stream: Operation not permitted in /in/ebvU4 on line 3 Warning: include(): Failed opening '../../../inc/includes.php' for inclusion (include_path='.:') in /in/ebvU4 on line 3 Warning: include_once(): open_basedir restriction in effect. File(../inc/portswitch.class.php) is not within the allowed path(s): (/tmp:/in:/etc) in /in/ebvU4 on line 4 Warning: include_once(../inc/portswitch.class.php): failed to open stream: Operation not permitted in /in/ebvU4 on line 4 Warning: include_once(): Failed opening '../inc/portswitch.class.php' for inclusion (include_path='.:') in /in/ebvU4 on line 4 Fatal error: Uncaught Error: Class 'PluginPortswitchPortswitch' not found in /in/ebvU4:21 Stack trace: #0 {main} thrown in /in/ebvU4 on line 21
Process exited with code 255.
Output for 5.6.0 - 5.6.38
Warning: include(): open_basedir restriction in effect. File(../../../inc/includes.php) is not within the allowed path(s): (/tmp:/in:/etc) in /in/ebvU4 on line 3 Warning: include(../../../inc/includes.php): failed to open stream: Operation not permitted in /in/ebvU4 on line 3 Warning: include(): Failed opening '../../../inc/includes.php' for inclusion (include_path='.:') in /in/ebvU4 on line 3 Warning: include_once(): open_basedir restriction in effect. File(../inc/portswitch.class.php) is not within the allowed path(s): (/tmp:/in:/etc) in /in/ebvU4 on line 4 Warning: include_once(../inc/portswitch.class.php): failed to open stream: Operation not permitted in /in/ebvU4 on line 4 Warning: include_once(): Failed opening '../inc/portswitch.class.php' for inclusion (include_path='.:') in /in/ebvU4 on line 4 Fatal error: Class 'PluginPortswitchPortswitch' not found in /in/ebvU4 on line 21
Process exited with code 255.
Output for 5.1.0 - 5.1.6, 5.2.0 - 5.2.17, 5.3.0 - 5.3.29, 5.4.0 - 5.4.45, 5.5.0 - 5.5.38
Warning: include(../../../inc/includes.php): failed to open stream: No such file or directory in /in/ebvU4 on line 3 Warning: include(): Failed opening '../../../inc/includes.php' for inclusion (include_path='.:') in /in/ebvU4 on line 3 Warning: include_once(../inc/portswitch.class.php): failed to open stream: No such file or directory in /in/ebvU4 on line 4 Warning: include_once(): Failed opening '../inc/portswitch.class.php' for inclusion (include_path='.:') in /in/ebvU4 on line 4 Fatal error: Class 'PluginPortswitchPortswitch' not found in /in/ebvU4 on line 21
Process exited with code 255.
Output for 5.0.0 - 5.0.5
Warning: main(../../../inc/includes.php): failed to open stream: No such file or directory in /in/ebvU4 on line 3 Warning: main(): Failed opening '../../../inc/includes.php' for inclusion (include_path='.:') in /in/ebvU4 on line 3 Warning: main(../inc/portswitch.class.php): failed to open stream: No such file or directory in /in/ebvU4 on line 4 Warning: main(): Failed opening '../inc/portswitch.class.php' for inclusion (include_path='.:') in /in/ebvU4 on line 4 Fatal error: Class 'PluginPortswitchPortswitch' not found in /in/ebvU4 on line 21
Process exited with code 255.
Output for 4.4.2 - 4.4.9
Parse error: syntax error, unexpected T_IS_NOT_EQUAL, expecting '(' in /in/ebvU4 on line 11
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.3.11, 4.4.0 - 4.4.1
Parse error: parse error, unexpected T_IS_NOT_EQUAL, expecting '(' in /in/ebvU4 on line 11
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error, expecting `'('' in /in/ebvU4 on line 11
Process exited with code 255.

preferences:
298.48 ms | 401 KiB | 424 Q