Skip to content

Instantly share code, notes, and snippets.

@ScullWM
Created December 28, 2012 09:55
Show Gist options
  • Save ScullWM/4396517 to your computer and use it in GitHub Desktop.
Save ScullWM/4396517 to your computer and use it in GitHub Desktop.
<?php
public function isAccessOk((array)$abonnements, (array)$userGroupes)
{
$abonnements = array_flip($abonnements);
$userGrp = array_flip($userGroupes);
$at = array_merge($abos, $userGroupes);
return (bool)(count($at)<(count($abonnements)+count($userGroupes)));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment