• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

ismemberof vs. in_array?

James

Well-known member
#1
I've noticed ismemberof is a helper function for checking usergroups, but what makes this beneficial over the PHP function in_array()?

AFAIK, ismemberof doesn't actually support multiple usergroup checking, so wouldn't it be better practice to use in_array($var, array(values)) instead of multiple ismemberof checks?