By the sounds of it, you would fail my interview technique as well. At interview I expect candidates to write code on the whiteboard. It might seem tough, but it allows candidates to show that they do know the language, and are not relying on intelsense and google to program. Lets face it, if you are claiming on your CV to have 3.5 years of PHP experience, then at interview I want to see some evidence of your experience.
I also use the process to identify people that think logically about their designs, write code that actually implements their design, and when faced with a new constraint understand how it affects their design, and what they need to adjust to accommodate this new information.
Whilst lots of companies do use the 20 question interview method, this method is a poor differentiator in identifying who the best programmers are, and good at identifying who has been reading a lot of books recently. If you are constantly facing this interview technique, start reading. You should want a 95-100% good answer rate on these questions to get offered the job, however it will not make you a better programmer on its own.
The major problem with "programming by google" is that whilst you may deliver code that works, but its quite possible that you have no understanding of it increasing the risk of subtle bugs and undesirable consequences. It will certainly take longer to write the code and your source code will have the same consistency as the internet making it much harder for your replacement to support your code in the future.
Whilst I'm sure that my answer is not the warm fuzzy reassurance that you may have wanted, hopefully it will help you to understand what you need to do differently to gain the knowledge and experience, or perhaps, may help you to understand why a career in a different sector may be a better choice for you. good luck for the future.