Others like isToday() assert if 2 strings are equal. When comparing strings numerically, PHP internally cast string to numeric, in this case integer number (year only). Also comparison operator is wrong in both methods, test case for isPast() and target branch.