7 ms·
The logic behind the difference is in the fact that PHP doesn't have assertions - the naming is based on the root cause, not when the occur. A RuntimeException
by debacle 11y ago
The logic behind the difference is in the fact that PHP doesn't have assertions - the naming is based on the root cause, not when the occur.
A RuntimeException is something like "Database connection failed." A LogicException is an implementation issue (e.g. usually requires a code change to fix).