In this code example, we start the session and set the is_admin session variable to true. This will be used later to authenticate the user as an admin with the am_i_admin function. Package Library: The PHP Session am_i_admin function is a standard function and does not require any package library. It is a built-in function of PHP and can be used in any PHP project.