You can't calculate before October 15th, 1582 (the first day of the Gregorian Calendar).
Instead of simply using PHP's date functions, this calculator is programmed with the same formula I use to do this in my head. I've created a document with instructions in case you would like to learn how to do it yourself.