Since you mentioned that you are new to Drupal, a caution is that using a PHP filter for your custom code is considered bad practice. This is a hack and a security issue.
It is much better to write your own custom module, and it can implement its own custom permissions that you can check, etc. etc. There is a good sample module that you can check to see how it should look. Obviously, look and a guide. It really is not as difficult as it seems.
But back to your question. You can put the following line on a page filtered in PHP:
global $user;
, . $user->roles - , . , authenticated user ( - ).