Advent of code 2020/25
Ajax Direct

Answer 639ms

Part 1 : 12285001 Part 2 :
[$card, $door] = $input->numbers();

// Get loop size of card
$v = 1;
$l = 0;
while ($v != $card) {
    $l++;
    $v *= 7;
    $v = $v % 20201227;
}

// Get encryption key from door
$v = 1;
for ($i = 0; $i < $l; $i++) {
    $v *= $door;
    $v = $v % 20201227;
}

$solution_1 = $v;
$solution_2 = "⭐";