3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php //session_start(); //session_write_close(); var_dump(SID); var_dump(sessionStatus()); // this would return false function sessionStatus() { if (function_exists('session_status')) { return (session_status() == PHP_SESSION_ACTIVE); } return defined('SID'); }
Output for 4.3.5 - 5.6.28, hhvm-3.12.0, 7.0.0 - 7.1.0
Notice: Use of undefined constant SID - assumed 'SID' in /in/SkrtR on line 4 string(3) "SID" bool(false)
Output for hhvm-3.10.0
Notice: Use of undefined constant SID - assumed 'SID' in /in/SkrtR on line 3 string(3) "SID" bool(false)
Output for 4.3.0 - 4.3.4
Notice: Use of undefined constant SID - assumed 'SID' in /in/SkrtR on line 4 string(3) "SID" int(0)