Ad
  • Default User Avatar

    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 of print_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 but 0, it won't print anything to your log (and the print_r statement doesn't really do anything in this case), and if $b IS 0, 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 of 0 / -1 since the lowest number is always the divisor.