How to write php to let jq's ajax enter the error callback function

that is, after my php executes any code or outputs something, the ajax submitted by jquery on my web page can enter the error callback function, preferably the one with information

.
Jun.19,2022

if you just want to enter the error callback function and the status code is 4xx, 5xx can

  

isn't it directly 500 if you write the wrong code

Menu