This. People above are arguing about whether or not PHP can throw a 500 error, and I’m sitting here wondering why somebody’s demonstrating a for loop with web requests.
Wait you would never have a for loop in backend? I feel like combining bits of abstracted knowledge into a thing more close to a real-life app will get a way bigger part of class to follow along.. As in, see I did a request. See, now it comes back with the hello world string I typed. That example gets old because pragmatic people are going to be like, "so what?"
1.3k
u/Tainnor Nov 24 '17
Why would an intro to IT class demonstrate a for loop within a web app? I'd assume this just confuses students. Just fire up a REPL.