1
exercism fetch php change

Change

Correctly determine the fewest number of coins to be given to a customer such that the sum of the coins' value would equal the correct amount of change.

For example

Edge cases

Running the tests

  1. Go to the root of your PHP exercise directory, which is <EXERCISM_WORKSPACE>/php. To find the Exercism workspace run

    1
    % exercism debug | grep Workspace
    
  2. Get PHPUnit if you don't have it already.

    1
    2
    % wget --no-check-certificate https://phar.phpunit.de/phpunit.phar
    % chmod +x phpunit.phar
    
  3. Execute the tests:

    1
    % ./phpunit.phar change/change_test.php
    

Source

Software Craftsmanship - Coin Change Kata https://web.archive.org/web/20130115115225/http://craftsmanship.sv.cmu.edu:80/exercises/coin-change-kata

Submitting Incomplete Solutions

It's possible to submit an incomplete solution so you can see how others have completed the exercise.