3v4l.org

run code in 300+ PHP versions simultaneously
<?php class MySessionStorage implements SessionHandlerInterface { private $path; function open($savePath, $sessionName) { $this->path = $savePath; } function close() { } function read($id) { return ''; } function write($id, $data) { return TRUE; } function destroy($id) { return TRUE; } function gc($maxlifetime) { return TRUE; } } if (session_set_save_handler(new MySessionStorage)){ try{ session_start(); } catch (Exception $e){ } }
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/Vdq8R 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/Vdq8R on line 13 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/Vdq8R on line 17 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/Vdq8R on line 22 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/Vdq8R on line 27 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/Vdq8R on line 32 Warning: session_set_save_handler(): Session save handler cannot be changed after headers have already been sent in /in/Vdq8R on line 38

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:
61 ms | 405 KiB | 8 Q