3v4l.org

run code in 300+ PHP versions simultaneously
<?php private 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/WSujN on line 2
Process exited with code 255.
Output for 5.3.0 - 5.3.27
Parse error: syntax error, unexpected T_PRIVATE in /in/WSujN on line 2
Process exited with code 255.

preferences:
183.67 ms | 1394 KiB | 57 Q