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() { return true; } function sessionclose() { echo "Session close\n"; return true; } function sessionwrite() { echo "Session write\n"; return true; } session_set_save_handler('dummy','sessionclose','dummy','sessionwrite','dummy','dummy'); session_start(); ?>
based on pfICE
Output for 7.1.0 - 7.2.0
Session close Warning: session_start(): Failed to read session data: user (path: ) in /in/NSmTZ on line 53 register_shutdown_function Object destructor Output buffer callback
Output for 5.3.21 - 7.0.20
register_shutdown_function Object destructor Output buffer callback Session write Session close