3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function output_html($ext) { return strlen($ext); } function open ($save_path, $session_name) { return true; } function close() { return true; } function read ($id) { } function write ($id, $sess_data) { ob_start("output_html"); echo "laruence"; ob_end_flush(); return true; } function destroy ($id) { } function gc ($maxlifetime) { return true; } session_set_save_handler ("open", "close", "read", "write", "destroy", "gc"); session_start();
Output for 7.1.0
Warning: session_start(): Failed to read session data: user (path: ) in /in/n1nXC on line 32
Output for 5.2.3 - 5.3.29, 5.4.4 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.0.14
8
Output for 5.4.0 - 5.4.3
laruence0
Output for 4.3.2 - 5.2.2
Warning: session_start(): Cannot send session cookie - headers already sent in /in/n1nXC on line 32 Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /in/n1nXC:32) in /in/n1nXC on line 32 8
Output for 4.3.0 - 4.3.1
Warning: session_start() [http://www.php.net/function.session-start]: Cannot send session cookie - headers already sent in /in/n1nXC on line 32 Warning: session_start() [http://www.php.net/function.session-start]: Cannot send session cache limiter - headers already sent (output started at /in/n1nXC:32) in /in/n1nXC on line 32 8