If you want to use type declarations in your own session handling class, don't "implements" the SessionHandlerInterface, SessionIdInterface, or SessinUpdateTimestampInterface, otherwise you will get a fatal error saying that declaration of the class method must be compatible with the interface method.
a bad example
<?php
class SessionWuXianchengHandler implements SessionHandlerInterface {
public function open(string $sessionPath, string $sessionName) : bool {
}
......
}
?>
a good example
<?php
class SessionWuXianchengHandler {
public function open(string $sessionPath, string $sessionName) : bool {
}
......
}
?>