3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php // Testing shutdown sequence function shutdown() { echo "register_shutdown_function\n"; } register_shutdown_function('shutdown'); class MyClass { function __destruct() { echo "Object destructor\n"; } } function obcallback($buffer) { $buffer .= "Output buffer callback\n"; return $buffer; } ob_start('obcallback'); $myObject = new MyClass; function dummy() { } function sessionclose() { echo "Session close\n"; } function sessionwrite() { echo "Session write\n"; } session_set_save_handler('dummy','sessionclose','dummy','sessionwrite','dummy','dummy'); session_start();
Output for 7.1.0
Warning: session_start(): Session callback expects true/false return value in /in/PFO7A on line 51 Session close Warning: session_start(): Session callback expects true/false return value in /in/PFO7A on line 51 Fatal error: session_start(): Failed to initialize storage module: user (path: ) in /in/PFO7A on line 51 register_shutdown_function Output buffer callback
Process exited with code 255.
Output for 7.0.0 - 7.0.14
Warning: session_start(): Session callback expects true/false return value in /in/PFO7A on line 51 Fatal error: session_start(): Failed to initialize storage module: user (path: ) in /in/PFO7A on line 51 register_shutdown_function Output buffer callback Session close Warning: Unknown: Session callback expects true/false return value in Unknown on line 0
Process exited with code 255.
Output for hhvm-3.12.0
Warning: Session callback expects true/false return value in /in/PFO7A on line 51 Fatal error: Failed to initialize storage module: user (path: ) in /in/PFO7A on line 51 register_shutdown_function Output buffer callback Session close Warning: Session callback expects true/false return value Object destructor
Process exited with code 255.
Output for hhvm-3.10.0
Warning: Session callback expects true/false return value in /in/PFO7A on line -1 Fatal error: Failed to initialize storage module: user (path: ) in /in/PFO7A on line -1 register_shutdown_function Output buffer callback Session close Warning: Session callback expects true/false return value Object destructor
Process exited with code 255.
Output for 5.2.3 - 5.6.28
register_shutdown_function Object destructor Output buffer callback Session write Session close
Output for 5.1.0 - 5.2.2
Warning: session_start(): Cannot send session cookie - headers already sent in /in/PFO7A on line 51 Warning: session_start(): Cannot send session cache limiter - headers already sent in /in/PFO7A on line 51 register_shutdown_function Object destructor Output buffer callback Session write Session close
Output for 5.0.5
Warning: session_start(): Cannot send session cookie - headers already sent in /in/PFO7A on line 51 Warning: session_start(): Cannot send session cache limiter - headers already sent in /in/PFO7A on line 51 Output buffer callback Object destructor register_shutdown_function Session write Session close
Output for 5.0.0 - 5.0.4
Warning: session_start(): Cannot send session cookie - headers already sent in /in/PFO7A on line 51 Warning: session_start(): Cannot send session cache limiter - headers already sent in /in/PFO7A on line 51 Output buffer callback register_shutdown_function Session write Session close Object destructor
Output for 4.3.2 - 4.4.9
Warning: session_start(): Cannot send session cookie - headers already sent in /in/PFO7A on line 51 Warning: session_start(): Cannot send session cache limiter - headers already sent in /in/PFO7A on line 51 Output buffer callback register_shutdown_function Session write Session close
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/PFO7A on line 51 Warning: session_start() [http://www.php.net/function.session-start]: Cannot send session cache limiter - headers already sent in /in/PFO7A on line 51 Output buffer callback register_shutdown_function Session write Session close