3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php if(!defined('GLPI_ROOT')) define('GLPI_ROOT', "../.."); function plugin_portswitch_install() { include_once( GLPI_ROOT."/plugins/portswitch/portswitch.class.php"); if(!(is_dir(GLPI_ROOT."/files/_plugins/portswitch"))) if(!(mkdir(GLPI_ROOT."/files/_plugins/portswitch"))) die("Konnte ".GLPI_ROOT."/files/_plugins/portswitch nicht erstellen."); PluginPortswitchPortswitch::$config_data[0]['name'] = "Name"; PluginPortswitchPortswitch::$config_data[0]['ip'] = "0.0.0.0"; PluginPortswitchPortswitch::$config_data[0]['port'] = "0"; PluginPortswitchPortswitch::$config_data[0]['kommentar'] = ""; PluginPortswitchPortswitch::$config_data[0]['status'] = "Unbekannt"; PluginPortswitchPortswitch::$config_data[0]['passwort'] = "Passwort"; PluginPortswitchPortswitch::$config_data[0]['stack'] = "0"; PluginPortswitchPortswitch::$config_data[0]['hostname'] = ""; PluginPortswitchPortswitch::saveConfig(); return true; } function plugin_portswitch_uninstall() { if(file_exists(GLPI_ROOT."/files/_plugins/portswitch/config.ini")) unlink(GLPI_ROOT."/files/_plugins/portswitch/config.ini"); if(is_dir(GLPI_ROOT."/files/_plugins/portswitch")) rmdir(GLPI_ROOT."/files/_plugins/portswitch"); return true; } ?>
Output for 5.0.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
Output for 4.4.2 - 4.4.9
Parse error: syntax error, unexpected '=', expecting '(' in /in/auOuQ on line 13
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1
Parse error: parse error, unexpected '=', expecting '(' in /in/auOuQ on line 13
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error, expecting `'('' in /in/auOuQ on line 13
Process exited with code 255.