3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function myCallingFunction(){ $x = $this->myRecursiveFunction(); var_dump($x); } 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.0.4 - 7.1.0
Notice: Undefined variable: return in /in/GeXih on line 33
Output for 4.3.0 - 5.0.3
Notice: Undefined variable: return in /in/GeXih on line 33