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 test; } } session_set_save_handler(new MySessionStorage); session_start();
Output for git.master, git.master_jit, rfc.property-hooks
Deprecated: Return type of MySessionStorage::open($savePath, $sessionName) should either be compatible with SessionHandlerInterface::open(string $path, string $name): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /in/6eaFB on line 8 Deprecated: Return type of MySessionStorage::close() should either be compatible with SessionHandlerInterface::close(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /in/6eaFB on line 14 Deprecated: Return type of MySessionStorage::read($id) should either be compatible with SessionHandlerInterface::read(string $id): string|false, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /in/6eaFB on line 19 Deprecated: Return type of MySessionStorage::write($id, $data) should either be compatible with SessionHandlerInterface::write(string $id, string $data): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /in/6eaFB on line 24 Deprecated: Return type of MySessionStorage::destroy($id) should either be compatible with SessionHandlerInterface::destroy(string $id): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /in/6eaFB on line 29 Deprecated: Return type of MySessionStorage::gc($maxlifetime) should either be compatible with SessionHandlerInterface::gc(int $max_lifetime): int|false, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /in/6eaFB on line 34 Warning: session_set_save_handler(): Session save handler cannot be changed after headers have already been sent in /in/6eaFB on line 41 Warning: session_start(): Session cannot be started after headers have already been sent in /in/6eaFB on line 44

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
43.39 ms | 405 KiB | 8 Q