You can almost always take solid, processed snacks (like crackers, chips, granola bars, and chocolate) through customs without issue, as long as they are for personal use and in their original packaging. The "hard line" for customs, especially when entering the US, Australia, or the UK, is fresh produce, meats, and dairy. You must never try to bring fresh fruit, vegetables, or unsealed meat products across an international border, as these can carry pests or diseases like foot-and-mouth; these items will be confiscated and can result in heavy fines if not declared. "Liquid" snacks like yogurt, peanut butter, or hummus are subject to the 3-1-1 rule at security, but once through security, they are fine for the plane. However, if you are entering a new country, you must declare all food items on your customs form. If you declare it and they don't allow it, they will simply take it away; if you don't declare it and they find it, you can face fines ranging from $300 to $500. When in doubt, "Declare it or dispose of it."