fork download
  1. <?php
  2.  
  3. $identityScopes = ['admin'];
  4. $allowedScopes = ['user','admin'];
  5.  
  6. $matches = array_intersect($identityScopes, $allowedScopes);
  7.  
  8. var_export($matches);
Success #stdin #stdout 0.02s 25868KB
stdin
Standard input is empty
stdout
array (
  0 => 'admin',
)