3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?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 7.0.0 - 7.1.0
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 hhvm-3.12.0
Warning: File not found: ../../../inc/includes.php in /in/ebvU4 on line -1 Warning: File not found: ../inc/portswitch.class.php in /in/ebvU4 on line -1 Fatal error: Class undefined: PluginPortswitchPortswitch in /in/ebvU4 on line -1
Process exited with code 255.
Output for hhvm-3.10.0
Warning: File not found: ../../../inc/includes.php in /in/ebvU4 on line 3 Warning: File not found: ../inc/portswitch.class.php in /in/ebvU4 on line 4 Fatal error: Class undefined: PluginPortswitchPortswitch in /in/ebvU4 on line 21
Process exited with code 255.
Output for 5.1.0 - 5.6.28
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.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.