The simple answer is that the bcmod() function does not use the exact same method to calculate the modulus as Perl's modulus operator.

I have not looked at the related C source code of either language, but obviously they need to preform division which returns a floating point number which then is either truncated or rounded to an integer. If it is rounded, is it being rounded up or down (POSIX ceil or floor)?

Why are you stringifying the numbers and unnecessarily using concatenation? PHP might need to use that inefficiency, but Perl doesn't.