I want to execute some functions if entity is member of few classes but not some.
There is a function called
if ($entity !instanceof [User,Order,Product])
Give them a common interface and then
if (!$entity instanceof ShopEntity)
or stay with
if (!$entity instanceof User && !$entity instanceof Product && !$entity instanceof Order)
I would avoid creating arbitrary functions just to save some characters at a single place. On the other side if you need it "too often", you may have a design flaw? (In the meaning of "too much edge cases" or such)