Advent of Code is an Advent calendar of small programming puzzles for a variety of skill sets and skill levels that can be solved in any programming language you like. The website is: adventofcode.com
I do not own Advent of Code (obviously). These solutions are not the best. Of course not. I do not care to optimise them for a true website or application, as I just need to find an answer. Sometimes in life, that's the only goal. One answer. You can copy these codes if you happen to need them, but understand that you should optimise them. Please do not copy them for the sake of determining the answer to the puzzle. That would be cheating. The goal is to grow in coding, not clicking the "ctrl + c" and "ctrl + v" keys. :)
Um... as I said above, you can use them, free of charge. The MIT license is there for that reason. So... yeah.
Please, if you want to, update the code to be optimised. I would appreciate that. I'm anything but an expert. So, if you (whoever you are) see an issue with my code, change it so that I can learn more about PHP and best practises!