Return value of get_permalink(0) and get_the_title(0)

If an ID is passed to get_the_title() or get_permalink(), they will use get_post() internally to get a copy of the full post object with that ID. But if get_post() is passed either nothing or a “falsy” value, like 0, then it will return the current global $post object. In the context of your code this is likely to be the current page.

So:

get_permalink( 0 );

Is equivalent to:

get_permalink( get_the_ID() );

Which is equivalent to:

get_permalink();

Because they are all referring to the current global $post.