3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class Controller{ public static function pieces(){ $p=explode("/", $_SERVER['REQUEST_URI']);//mag leeg zijn $p=array_filter($p); $pieces=array_values($p); new static($pieces);} final private function __construct($pieces){ $this->_construct(); $this->inlog = new UserLogin; $this->mysqli = new mysqli(HOST, USER, PASSWORD, DATABASE); $this->inlog->sec_session_start();} protected function _construct(){}} Controller::pieces(); ?>
Output for 7.0.0 - 7.1.0
Notice: Undefined index: REQUEST_URI in /in/cKWuN on line 5 Fatal error: Uncaught Error: Class 'UserLogin' not found in /in/cKWuN:12 Stack trace: #0 /in/cKWuN(8): Controller->__construct(Array) #1 /in/cKWuN(19): Controller::pieces() #2 {main} thrown in /in/cKWuN on line 12
Process exited with code 255.
Output for 5.3.0 - 5.6.28
Notice: Undefined index: REQUEST_URI in /in/cKWuN on line 5 Fatal error: Class 'UserLogin' not found in /in/cKWuN on line 12
Process exited with code 255.
Output for 5.1.0 - 5.2.17
Parse error: syntax error, unexpected T_STATIC, expecting T_STRING or T_VARIABLE or '$' in /in/cKWuN on line 8
Process exited with code 255.
Output for 5.0.0 - 5.0.5
Parse error: parse error, unexpected T_STATIC, expecting T_STRING or T_VARIABLE or '$' in /in/cKWuN on line 8
Process exited with code 255.
Output for 4.4.2 - 4.4.9
Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /in/cKWuN on line 4
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_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /in/cKWuN on line 4
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error, expecting `T_OLD_FUNCTION' or `T_FUNCTION' or `T_VAR' or `'}'' in /in/cKWuN on line 4
Process exited with code 255.