Philosophy, literally, "love of wisdom" in Greek, is a very broad topic.
In the largest sense, anyone who ever thinks is a philosopher. In the narrowest sense, philosophy is what is left of thinking when you take "science" out of it.
What is science? This is a hard thing to classify in a few short words, but let me try anyway. Science is the study of the world around us through observation and philosophy. Science assumes that there is an order to the universe, and that that order is logically consistent. (See Religion.)
So, in short, philosophy is what you get when you don't observe and experiment with the world around us. It is, in the spectrum of logical thought systems, completely opposite to Physics.
When you try to marry physics and philosophy, you always get disaster. The reasons is rather obvious. You're trying to mix oil and water, two substances that simply don't go together. At best, you can get mayonnaise, which is neither oil nor water, but something entirely different and something of questionable value.
It's best to leave philosophy out of physics.
How can you tell when philosophy enters the equation? The answer is rather simple.
The question, "Why?" is a perfectly reasonable question. However, it means multiple things.
It could mean, "By what process?" In that case, physics has the answer. You can verify the answer by looking at each independent point in the process, and checking that each process leads to the other. You can quantify and measure these things.
It could mean, "For what purpose?" In that case, physics can never ever have the answer. Ultimately, purpose is something subjective that can never be uncovered by experimentation.
To help you understand, let's ask the question, "Why are tires on a car round?"
The physicist can easily explain this: "The round tires mean that the forces are such and such and friction is minimized, etc..."
The philosopher is probably interested in why the universe is constructed in such a way that automobile tires are inevitably round. Any answer you come up for that is not going to be measurable---we only have the universe in front of us, and we have no access to any other universes whatsoever. Nor could we hope to discern the "mind" of the universe, or its Creator, through any such experiment.