The best way to learn everything is to do it wrong.
My tendency is to put off the application of knowledge and keep gathering, partly because I’m afraid of doing it wrong and partly because I like ideas in my head more than practicalities. But it’s fun to play with the animals. And if I mess something up, I haven’t wasted any finite, physical materials, like I would have if I was building a house or baking a cake. I can do it wrong as often as I like, and I’ll always learn something. Doing is the way to learn any trade after running through the basics.
I like the brutal fact of coding. It either it works or it doesn’t. The only way to really know how things work is to do them, and it’s pretty obvious most of the time why something didn’t work. PHP even gives you the line number when something messes up! There’s no liberal arts chicken-egg muddled multiple factors issue when trying to understand psychology or socioeconomics or political systems.
Yet learning to code seems endless. There’s a newer or more elegant way to do something: a new library will come out with different functionality, updates to a language will ship, a site will need to do something else. I’ll never be done learning.