must I do global $var1 in every function?
Yes.
Functions in PHP get their own variable scope. The only way to gain access to variables in the global scope is to request them directly.
I'm sure you'll understand how this can cause difficult-to-read spaghetti code. Avoid globals whenever you can.
If you are building OO code, consider a Registry (a namespaced collection) and/or Dependency Injection (passing objects required by a new object in the constructor) instead.