migueabellan / aoc
Advent Of Code - Library PHP
Installs: 11
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/migueabellan/aoc
Requires
- php: ^8.1
- ext-ctype: *
- ext-iconv: *
- guzzlehttp/guzzle: ^7.2
- symfony/console: ^6.0
- symfony/dotenv: ^6.0
Requires (Dev)
- phpstan/extension-installer: ^1.1
- phpunit/phpunit: ^9.5
- squizlabs/php_codesniffer: ^3.6
This package is auto-updated.
Last update: 2025-09-27 20:52:08 UTC
README
Table of Contents
Installation
composer require migueabellan/aoc
Basic Usage
Create a .env.local
file to make environment variables.
# DO NOT COMMITTED THIS FILE
SESSION_AOC=your_cookie_session
Autoloading
Supports PSR-4
autoloaders.
<?php // When installed via composer require_once 'vendor/autoload.php'; use Aoc\Client; $client = new Client(); // Retrieve input by year and day $input = $client->getInputBy(2020, 23); echo $input; // 543769257...
Advanced Usage
<?php use Aoc\Puzzle\AbstractPuzzle; class Puzzle extends AbstractPuzzle { public function exec1(array $input = []): int|string { $result = 0; // ... return (string)$result; } public function exec2(array $input = []): int|string { $result = 0; // ... return (string)$result; } }
Utils
<?php use Aoc\Utils; $array = [0, 1, 2]; $permutations = ArrayUtil::permutations($array); print_r($permutations); // [[0, 1, 2], [0, 2, 1], [2, 1, 0] ...]