Try to phrase your question in a few different ways and search for all of those.
Just do keyword searches (e.g. "php remove namespace domdocument") in addition to searching for actual questions (e.g. "how do i remove namespace in domdocument with php").
Search using Google rather than, or in addition to, directly on Stack Overflow. Google is a search engine, focussing exclusively on search, while search on Stack Overflow is more of an extension, so you'd expect the prior to be better. On the other hand, being able to search using tags, answers, score, date and other properties makes Stack Overflow search very powerful, so it shouldn't be ignored.
My rule of thumb to see whether someone did any amount of searching before asking (which tends to effect whether or not I downvote, although not so much with self-answered questions) is to type the title as is (perhaps adding a language keyword) into Google and see if I can get an answer (not from the question I'm checking). I'd recommend doing that specifically.
If you've searched a bit and didn't find anything, don't be too concerned with your question being marked as a duplicate - it can always serve as a pointer to the duplicate for someone trying to search in the same way you did.