public function next() {
        $path = $this->path;

        $last = array_pop($path);

        if ($hardened = (strpos($last, "'") !== false)) {
            $last = str_replace("'", "", $last);
        }

        $last = (int)$last;
        $last += 1;

        if ($hardened) {
            $last .= "'";
        }

        $path[] = $last;

        return new static($path);
    }
public function next() {
        $path = $this->path;

        $last = array_pop($path);

        if ($hardened = (strpos($last, "'") !== false)) {
            $last = str_replace("'", "", $last);
        }

        $last = (int)$last;
        $last += 1;

        if ($hardened) {
            $last .= "'";
        }

        $path[] = $last;

        return new static($path);
    }
public function next ( ) { $ path = $ this -> path ; $ last = array_pop ( $ path ) ; if ( $ hardened = ( strpos ( $ last , "'" ) !== false ) ) { $ last = str_replace ( "'" , "" , $ last ) ; } $ last = ( int ) $ last ; $ last += 1 ; if ( $ hardened ) { $ last .= "'" ; } $ path [ ] = $ last ; return new static ( $ path ) ; }
increase the last level of the path by 1 and return the new path

@return BIP32Path
increase the last level of the path by 1 and return the new path