PHP 7.4 does NOT support mixed type hinting ;_;

This commit is contained in:
William 2022-01-24 09:00:22 +01:00
parent 5659ee2a52
commit ff920711a0

View File

@ -17,7 +17,8 @@ class Session
return array_key_exists($key, $_SESSION); return array_key_exists($key, $_SESSION);
} }
public function get(string $key): mixed // Returns mixed but php 7.4 DOES NOT SUPPORT THAT TYPE HINT >:((
public function get(string $key)
{ {
if ($this->has($key)) if ($this->has($key))
{ {
@ -26,7 +27,7 @@ class Session
return NULL; return NULL;
} }
public function set(string $key, mixed $value): void public function set(string $key, $value): void
{ {
$_SESSION[$key] = $value; $_SESSION[$key] = $value;
} }