PHP is the one without error checking (pre-compilation/running), I wasn't referring to JS in this instance. I was referring to Java (not JS) vs PHP.
Ok, as an example: - [THESE BELOW CODES WILL NOT WORK ON THEIR OWN]
Java
public static String methodName(String argumentHere) {
String argument2 = argumentHere;
int argument3 = argument2;
return argument3;
}
The above would throw an error if the syntax wasn't correct, and if the variables did not exist, and if the variables were not already defined, and the above will indeed throw an error due to the return type of the variable being wrong, compared to what is in the method identity, etc. It will not work.
PHP
methodName () {
$information = informationGetter($information->getInformation());
}
The above would not throw an error and stop the program/code running in the event of getInformation not existing. The code will simply run and $information will be null or whatever. You'll get a little underline under getInformation, but that's probably about it, unless the methodName is actually called and then it will throw an error at that moment.
Probably not the best examples, but eh...