3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php //require_once("human.php"); //require("skills.php"); class You { public $role = "Developer"; public $skills = array("Web", "php", "MySQL", "HTML", "CSS"); public $person = array("Talent", "Humour", "Experience"); public function find() { $c = 0; if(in_array("Web Development", $this->skills)) { foreach ($this->skills as &$skill) { if (strpos($skill, "Web")) { $c .= +2; echo "gogo"; } else { $c++; } } } return $c; } } $Developer = new You(); $requiredLevel = 6; if($Developer->find() >= $requiredLevel) echo "yep"; else echo $Developer->find(); ?>
Output for 5.0.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
0
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/basRo on line 7
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/basRo on line 7
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/basRo on line 7
Process exited with code 255.