For the most part, sanity checks are put into the code to ensure there are no bugs. For this reason, guaranteeing sanity checks are done correctly becomes necessary. If you do not check to see if the data is valid, and it is invalid, then you're going to allow invalid data to proceed. Here, I'm going to discuss how I think we should do sanity checking in PHP.
For the most part, sanity checks are put into the code to ensure there are no bugs. For this reason, guaranteeing sanity checks are done correctly becomes necessary. If you do not check to see if the data is valid, and it is invalid, then you're going to allow invalid data to proceed. Here, I'm going to discuss how I think we should do sanity checking in PHP.
Reference: https://dev.to/icambridge/code-review-sanity-checks