make use of str_starts_with / str_ends_with / str_contains

This commit is contained in:
Shish
2020-10-25 19:31:58 +00:00
parent c783ff0e8d
commit 19a6b39c70
21 changed files with 42 additions and 36 deletions

View File

@ -42,7 +42,7 @@ ini_set('assert.exception', '1'); // throw exceptions when failed
set_error_handler(function ($errNo, $errStr) {
// Should we turn ALL notices into errors? PHP allows a lot of
// terrible things to happen by default...
if (strpos($errStr, 'Use of undefined constant ') === 0) {
if (str_starts_with($errStr, 'Use of undefined constant ')) {
throw new Exception("PHP Error#$errNo: $errStr");
} else {
return false;