3v4l.org

run code in 300+ PHP versions simultaneously
<?php class MySessionStorage implements SessionHandlerInterface { private $path; function open($savePath, $sessionName) { $this->path = $savePath; return true; } function close() { return true; } function read($id) { return true; } function write($id, $data) { return true; } function destroy($id) { return true; } function gc($maxlifetime) { return true; } } session_set_save_handler(new MySessionStorage); session_start();

preferences:
54.21 ms | 402 KiB | 5 Q