3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class MySessionStorage implements SessionHandlerInterface { private $path; function open($savePath, $sessionName) { $this->path = $savePath; } function close() { return TRUE; } function read($id) { return ''; } function write($id, $data) { return TRUE; } function destroy($id) { return TRUE; } function gc($maxlifetime) { return TRUE; } } session_set_save_handler(new MySessionStorage); session_start();
based on Mjblg
Output for 7.2.0
Warning: session_start(): Session callback expects true/false return value in /in/hMLaM on line 43 Warning: session_start(): Failed to initialize storage module: user (path: ) in /in/hMLaM on line 43
Output for 7.0.0 - 7.1.10
Warning: session_start(): Session callback expects true/false return value in /in/hMLaM on line 43 Fatal error: session_start(): Failed to initialize storage module: user (path: ) in /in/hMLaM on line 43
Process exited with code 255.
Output for 5.5.0 - 5.6.28