3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function myCallingFunction(){ $x = $this->myRecursiveFunction(); var_dump($x); } private function myRecursiveFunction($next = null, $recursion = false, $myArray = array()) { $return = false; if (!$recursion) { $result = json_decode($this->getMyResults); $myArray = $result->myResults; if ($result->getMore) { $this->myRecursiveFunction($result->getMore, true, $myArray); $return = false; }else{ $return = true; } } else { $result = json_decode($this->getMyResults); $myArray = array_merge($myArray,$result->myResults); if ($result->getMore) { $this->myRecursiveFunction($result->getMore, true, $myArray); $return = false; }else{ $return = true; } } if($return){ var_dump($myArray); return $myArray; }
Output for 5.4.0 - 5.4.21
Parse error: syntax error, unexpected 'private' (T_PRIVATE) in /in/NhvAu on line 10
Process exited with code 255.
Output for 5.3.0 - 5.3.27
Parse error: syntax error, unexpected T_PRIVATE in /in/NhvAu on line 10
Process exited with code 255.