These are my solutions to the Advent of Code 2024 in modern PHP.
All code is written without any assistance by a LLM (where would be the fun then, right?).
I don't try to write the most efficient code, but the most readable so that someone can read and understand it quickly.
- PHP 8.3+
- Composer
$ git clone https://github.com/marco-kretz/advent-of-code-2024.git
$ cd advent-of-code-2024
$ composer install
Put input into inputs/
as txt files day1.txt, day2.txt, ...
$ php bin/solve day1
Day | Time Part 1 | Time Part 2 | Memory (peak) |
---|---|---|---|
1 | <0.001s | 0.007s | 1.84mb |
2 | <0.001s | 0.001s | 1.98mb |
3 | <0.001s | <0.001s | 1.81mb |
4 | 0.007s | 0.008s | 6.07mb |
5 | 0.001s | 0.001s | 2.19mb |
6 | 0.001s | 2.619s | 4.44mb |
7 (old) | 0.150s | 7.882s | 2.33mb |
7 | 0.007s | 0.014s | 3.68mb |
8 | <0.001s | <0.001s | 1.89mb |
9 | 0.003s | 6.02mb |