First and foremost, scraping the web (in PHP) is bad, mkay? PHP web scraping isn't worse than doing it with other languages, it's just that web scraping in general is most likely to be looked by with disdain by content-producers. And it'll make your code more brittle than it should be, and is general going to make an application more complex to build.
This is the second in a series detailing what I consider "Thoughtful Code." In the first one, I highlighted the high-level overview of what I consider "good" code, here I'm going to go (a lot) deeper into what this overarching framework means in its specific components. Well one of it's components. Specifically, the context in which our code lives, and how that shapes our definition of code quality.
I've given the talk "Banishing Loops with Functional PHP" (or "Functional Programming, it just depends on how I titled it) at least three times. But it's still, mostly a talk. You can watch a talk I've given many times right here:
Let's get it out of the way early: PHP is a strange and ugly language. It's not exceptionally fast. It's not beautiful syntactically. It's not formulated around a clear opinion about good software development practices. And it's still what I write a lot of software in. The obvious question is: why? Why use PHP today?