3v4l.org

run code in 200+ 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.2.0
Warning: session_start(): Session callback expects true/false return value in /in/pfICE on line 51 Session close Warning: session_start(): Session callback expects true/false return value in /in/pfICE on line 51 Warning: session_start(): Failed to initialize storage module: user (path: ) in /in/pfICE on line 51 register_shutdown_function Object destructor Output buffer callback
Output for 7.1.0 - 7.1.10
Warning: session_start(): Session callback expects true/false return value in /in/pfICE on line 51 Session close Warning: session_start(): Session callback expects true/false return value in /in/pfICE on line 51 Fatal error: session_start(): Failed to initialize storage module: user (path: ) in /in/pfICE on line 51 register_shutdown_function Output buffer callback
Process exited with code 255.
Output for 7.0.0 - 7.0.20
Warning: session_start(): Session callback expects true/false return value in /in/pfICE on line 51 Fatal error: session_start(): Failed to initialize storage module: user (path: ) in /in/pfICE 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 5.3.21 - 5.6.28
register_shutdown_function Object destructor Output buffer callback Session write Session close