I give my dog chocolate mint leaves to eat, and he is fine. Now, you must know that my dog has a very sensitive stomach, and he will have a reaction if anything doesn't sit right with him.
I haven't tried given him basil since I didn't have none last year. This year I have some growing in the containers, and he likes to sniff the smell of basil.
Garlic, on the hand, I have read somewhere that it isn't good for dog! I urge you to do some searches on this subject if you want to make sure your pets are fine with it.