<?php

        $identityScopes = ['admin'];
        $allowedScopes  = ['user','admin'];

        $matches = array_intersect($identityScopes, $allowedScopes);
        
        var_export($matches);