From c30135ef6a94c525b419c5fb11f9bd74ff80496d Mon Sep 17 00:00:00 2001 From: Steph Date: Thu, 1 Dec 2022 21:02:00 +0100 Subject: [PATCH] Day 6 in php, this was a mistake lol --- 2021/6/.gitignore | 1 + 2021/6/growth.php | 28 ++++++++++++++++++++++++++++ 2 files changed, 29 insertions(+) create mode 100644 2021/6/.gitignore create mode 100644 2021/6/growth.php diff --git a/2021/6/.gitignore b/2021/6/.gitignore new file mode 100644 index 0000000..3f9177e --- /dev/null +++ b/2021/6/.gitignore @@ -0,0 +1 @@ +input diff --git a/2021/6/growth.php b/2021/6/growth.php new file mode 100644 index 0000000..3955ab3 --- /dev/null +++ b/2021/6/growth.php @@ -0,0 +1,28 @@ +#!/usr/bin/env php + &$v) { + $v--; + if($v == -1) { + $v = 6; + $input[] = 9; + } + } + +} + +echo "Total number of fish after $days days: " . count($input); + +?>