public $headers = true;
public function fixOK(){
$this->headers = !$this->headers;
}
// Старый вариант (PHP <7or8)
if($this->headers){
return "Тут всё норм";
}else{
return "Тут не совсем норм";
}
// Более новый и компактный
return ($this->headers) ? Тут всё норм": "Тут не совсем норм";
return $this->headers;
return !!$this->headers;