OOP PHP类可变范围

I decided to begin looking into pdo last night. Right now i am converting my procedural code to oop. I have had a few issues but have been able to figure them out through tutorials etc. One that i cannot find a clear answer on is global variables.

I have various classes

User ( Allows me to gather all user data )

Login

Registration

Utilities

Database

Utilities includes things like IPsniffer, User Input Sanitation, and various other functions.

Database just allows me to condense the lines needed for a query or insert, etc.

I need utilities and Database in nearly all of the other classes. I was looking into various ways of passing the variables to the functions. But there seems to be mixed feelings against each method.

( I also have a few variables like $url, $path, etc. that need to be included in each class this is why i am trying to avoid paramaters )

So my question is this. Should i just use parameters and assign everything in a construct? Use globals? What would be a simple way to set those variables to have a global scope that is considered "Good" practice. Or should i create a new instance of the class wherever i need it ( Inside the other classes )

( Also i have an autoloader in the header of the page not sure if there is a way to utilize that within the classes, i do not want to duplicate the code over and over )

Any thoughts?

An answer to your question depends highly on the design you do with your application (this "depending on design" is most likely the reason you have mixed feeling, but telling so won't change your feelings).

However, the most likely sane answer is to pass as constructor parameters (constructor injection) and also to not use new inside a constructor regardless of which design you follow.