(With one main function like User(), but without user class)

I don't really have idea what is smart way to create bunch of information picked up with the "arrow" I actually know what are they, but I don't know how to explain or what ever it is that I can search it from google.

But I want it to be like this:

function User($Name) {
// Other shiiieeeeet
}

Example results:
<?php $User($_SESSION['account'])->ID; ?>
<?php $User($_SESSION['account'])->Account; ?>
<?php $User($_SESSION['account'])->Mail; ?>
<?php $User($_SESSION['account'])->Skype; ?>

I can use such a feature for logged in users as I can use it for profiles like this.

<?php $User($_GET['profile'])->ID; ?>
<?php $User($_GET['profile'])->Account; ?>

etc...

But I don't have a clue how do I create "inner function" / "nested function" or whatever that I can use it with arrow. I've seen such a thing before, but it doesn't really help me just now. If I create functions inside of function I cannot use them with arrow.

Any ideas? Thanks!