You will need to install PHP
v8.0 or later, there are multiple ways of achieving this depending on the machine you are
using.
- If you have previously installed
brew
, run the following in a new terminal prompt:
brew install php
- Otherwise, follow the instructions here to
install
brew
andPHP
at the same time.
- Follow the instructions here.
Once PHP
is installed, you will need to install the dependencies from composer
(which is PHP
's package manager
ala npm
). To do this:
- Open a new terminal prompt pointing to this repository
- Navigate to
exercises/php
, e.g.
cd exercises/php/
- Run the following
PHP
command:
php composer.phar install
- Open a new terminal prompt pointing to this repository
- Navigate to
exercises/php
, e.g.
cd exercises/php/
- Run the following command:
./vendor/bin/phpunit --testdox tests
You should see an output with the tests that have run and how many passed/failed, no tests should fail so let someone know if they do!