Why does the condition not work? In fact, it turns out - if 403! = 403 then we assign true. Obviously, the condition does not work here, but it, all the same, assigns true. What I do not understand?
$headers = 'HTTP/1.1 403 Forbidden'; preg_match('/[0-9]{3}/ui', $headers, $matches); if((int)$matches[0] != 403) { $headers_check = true; } echo $headers_check; //Результат вывода 1
$headers_checkdeclared? sandbox.onlinephpfunctions.com/code/… - Suvitruf ♦