3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class CompanyConfig { protected $name; protected $db_name; protected $localdb_name; protected $logo_file_path; protected $logo_top_offset; protected $site_name; protected $css_class_name; public function getName() { return $this->name; } public function setName($name) { $this->name = $name; return $this; } public function getDbName() { return $this->db_name; } public function setDbName($db_name) { $this->db_name = $db_name; return $this; } public function getLogoFilePath() { return $this->logo_file_path; } public function setLogoFilePath($logo_file_path) { $this->logo_file_path = $logo_file_path; return $this; } public function getSiteName() { return $this->site_name; } public function setSiteName($site_name) { $this->site_name = $site_name; return $this; } public function getCssClassName() { return $this->css_class_name; } public function setCssClassName($css_class_name) { $this->css_class_name = $css_class_name; return $this; } public function getLogoTopOffset() { return $this->logo_top_offset; } public function setLogoTopOffset($logo_top_offset) { if (!is_numeric($logo_top_offset)) { throw new \InvalidArgumentException("'$logo_top_offset' must be numeric"); } $this->logo_top_offset = $logo_top_offset; return $this; } public function getStylesheetName() { return 'site_'.$this->getCssClassName(); } }
based on qDQa2
Output for 5.3.0 - 7.1.0
Output for 5.0.0 - 5.2.17
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/Ns1mR on line 69
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/Ns1mR 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/Ns1mR 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/Ns1mR on line 4
Process exited with code 255.