Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
No it doesn't. In your code, you are trying to use
print_r
to print both inputs separated by a comma.print_r
doesn't work that way. The first input ofprint_r
is what you want to print, the second input is a boolean which is set to false by default and decides whether you want to return the value or print it. Using it this way leads to some pretty confusing logs. The way it is in your code right now, if$b
is anything but0
, it won't print anything to your log (and theprint_r
statement doesn't really do anything in this case), and if$b
IS0
, it will only print$a
. In the test that your code is failing,$a
is 0 and$b
is-1
, so you have to find the remainder of0 / -1
since the lowest number is always the divisor.