3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php var_dump( session_get_cookie_params(), ini_get_all('session', false), $_COOKIE );
Output for 7.1.0
array(5) { ["lifetime"]=> int(0) ["path"]=> string(1) "/" ["domain"]=> string(0) "" ["secure"]=> bool(false) ["httponly"]=> bool(false) } array(29) { ["session.auto_start"]=> string(1) "0" ["session.cache_expire"]=> string(3) "180" ["session.cache_limiter"]=> string(7) "nocache" ["session.cookie_domain"]=> string(0) "" ["session.cookie_httponly"]=> string(0) "" ["session.cookie_lifetime"]=> string(1) "0" ["session.cookie_path"]=> string(1) "/" ["session.cookie_secure"]=> string(0) "" ["session.gc_divisor"]=> string(3) "100" ["session.gc_maxlifetime"]=> string(4) "1440" ["session.gc_probability"]=> string(1) "1" ["session.lazy_write"]=> string(1) "1" ["session.name"]=> string(9) "PHPSESSID" ["session.referer_check"]=> string(0) "" ["session.save_handler"]=> string(5) "files" ["session.save_path"]=> string(0) "" ["session.serialize_handler"]=> string(3) "php" ["session.sid_bits_per_character"]=> string(1) "4" ["session.sid_length"]=> string(2) "32" ["session.upload_progress.cleanup"]=> string(1) "1" ["session.upload_progress.enabled"]=> string(1) "1" ["session.upload_progress.freq"]=> string(2) "1%" ["session.upload_progress.min_freq"]=> string(1) "1" ["session.upload_progress.name"]=> string(27) "PHP_SESSION_UPLOAD_PROGRESS" ["session.upload_progress.prefix"]=> string(16) "upload_progress_" ["session.use_cookies"]=> string(1) "1" ["session.use_only_cookies"]=> string(1) "1" ["session.use_strict_mode"]=> string(1) "0" ["session.use_trans_sid"]=> string(1) "0" } array(0) { }
Output for 7.0.0 - 7.0.14
array(5) { ["lifetime"]=> int(0) ["path"]=> string(1) "/" ["domain"]=> string(0) "" ["secure"]=> bool(false) ["httponly"]=> bool(false) } array(31) { ["session.auto_start"]=> string(1) "0" ["session.cache_expire"]=> string(3) "180" ["session.cache_limiter"]=> string(7) "nocache" ["session.cookie_domain"]=> string(0) "" ["session.cookie_httponly"]=> string(0) "" ["session.cookie_lifetime"]=> string(1) "0" ["session.cookie_path"]=> string(1) "/" ["session.cookie_secure"]=> string(0) "" ["session.entropy_file"]=> string(12) "/dev/urandom" ["session.entropy_length"]=> string(2) "32" ["session.gc_divisor"]=> string(3) "100" ["session.gc_maxlifetime"]=> string(4) "1440" ["session.gc_probability"]=> string(1) "1" ["session.hash_bits_per_character"]=> string(1) "4" ["session.hash_function"]=> string(1) "0" ["session.lazy_write"]=> string(1) "1" ["session.name"]=> string(9) "PHPSESSID" ["session.referer_check"]=> string(0) "" ["session.save_handler"]=> string(5) "files" ["session.save_path"]=> string(0) "" ["session.serialize_handler"]=> string(3) "php" ["session.upload_progress.cleanup"]=> string(1) "1" ["session.upload_progress.enabled"]=> string(1) "1" ["session.upload_progress.freq"]=> string(2) "1%" ["session.upload_progress.min_freq"]=> string(1) "1" ["session.upload_progress.name"]=> string(27) "PHP_SESSION_UPLOAD_PROGRESS" ["session.upload_progress.prefix"]=> string(16) "upload_progress_" ["session.use_cookies"]=> string(1) "1" ["session.use_only_cookies"]=> string(1) "1" ["session.use_strict_mode"]=> string(1) "0" ["session.use_trans_sid"]=> string(1) "0" } array(0) { }
Output for 5.5.24 - 5.6.28
array(5) { ["lifetime"]=> int(0) ["path"]=> string(1) "/" ["domain"]=> string(0) "" ["secure"]=> bool(false) ["httponly"]=> bool(false) } array(30) { ["session.auto_start"]=> string(1) "0" ["session.cache_expire"]=> string(3) "180" ["session.cache_limiter"]=> string(7) "nocache" ["session.cookie_domain"]=> string(0) "" ["session.cookie_httponly"]=> string(0) "" ["session.cookie_lifetime"]=> string(1) "0" ["session.cookie_path"]=> string(1) "/" ["session.cookie_secure"]=> string(0) "" ["session.entropy_file"]=> string(12) "/dev/urandom" ["session.entropy_length"]=> string(2) "32" ["session.gc_divisor"]=> string(3) "100" ["session.gc_maxlifetime"]=> string(4) "1440" ["session.gc_probability"]=> string(1) "1" ["session.hash_bits_per_character"]=> string(1) "4" ["session.hash_function"]=> string(1) "0" ["session.name"]=> string(9) "PHPSESSID" ["session.referer_check"]=> string(0) "" ["session.save_handler"]=> string(5) "files" ["session.save_path"]=> string(0) "" ["session.serialize_handler"]=> string(3) "php" ["session.upload_progress.cleanup"]=> string(1) "1" ["session.upload_progress.enabled"]=> string(1) "1" ["session.upload_progress.freq"]=> string(2) "1%" ["session.upload_progress.min_freq"]=> string(1) "1" ["session.upload_progress.name"]=> string(27) "PHP_SESSION_UPLOAD_PROGRESS" ["session.upload_progress.prefix"]=> string(16) "upload_progress_" ["session.use_cookies"]=> string(1) "1" ["session.use_only_cookies"]=> string(1) "1" ["session.use_strict_mode"]=> string(1) "0" ["session.use_trans_sid"]=> string(1) "0" } array(0) { }
Output for 5.4.0 - 5.4.45
array(5) { ["lifetime"]=> int(0) ["path"]=> string(1) "/" ["domain"]=> string(0) "" ["secure"]=> bool(false) ["httponly"]=> bool(false) } array(29) { ["session.auto_start"]=> string(1) "0" ["session.cache_expire"]=> string(3) "180" ["session.cache_limiter"]=> string(7) "nocache" ["session.cookie_domain"]=> string(0) "" ["session.cookie_httponly"]=> string(0) "" ["session.cookie_lifetime"]=> string(1) "0" ["session.cookie_path"]=> string(1) "/" ["session.cookie_secure"]=> string(0) "" ["session.entropy_file"]=> string(12) "/dev/urandom" ["session.entropy_length"]=> string(2) "32" ["session.gc_divisor"]=> string(3) "100" ["session.gc_maxlifetime"]=> string(4) "1440" ["session.gc_probability"]=> string(1) "1" ["session.hash_bits_per_character"]=> string(1) "4" ["session.hash_function"]=> string(1) "0" ["session.name"]=> string(9) "PHPSESSID" ["session.referer_check"]=> string(0) "" ["session.save_handler"]=> string(5) "files" ["session.save_path"]=> string(0) "" ["session.serialize_handler"]=> string(3) "php" ["session.upload_progress.cleanup"]=> string(1) "1" ["session.upload_progress.enabled"]=> string(1) "1" ["session.upload_progress.freq"]=> string(2) "1%" ["session.upload_progress.min_freq"]=> string(1) "1" ["session.upload_progress.name"]=> string(27) "PHP_SESSION_UPLOAD_PROGRESS" ["session.upload_progress.prefix"]=> string(16) "upload_progress_" ["session.use_cookies"]=> string(1) "1" ["session.use_only_cookies"]=> string(1) "1" ["session.use_trans_sid"]=> string(1) "0" } array(0) { }
Output for 5.3.0 - 5.3.29
array(5) { ["lifetime"]=> int(0) ["path"]=> string(1) "/" ["domain"]=> string(0) "" ["secure"]=> bool(false) ["httponly"]=> bool(false) } array(25) { ["session.auto_start"]=> string(1) "0" ["session.bug_compat_42"]=> string(1) "1" ["session.bug_compat_warn"]=> string(1) "1" ["session.cache_expire"]=> string(3) "180" ["session.cache_limiter"]=> string(7) "nocache" ["session.cookie_domain"]=> string(0) "" ["session.cookie_httponly"]=> string(0) "" ["session.cookie_lifetime"]=> string(1) "0" ["session.cookie_path"]=> string(1) "/" ["session.cookie_secure"]=> string(0) "" ["session.entropy_file"]=> string(0) "" ["session.entropy_length"]=> string(1) "0" ["session.gc_divisor"]=> string(3) "100" ["session.gc_maxlifetime"]=> string(4) "1440" ["session.gc_probability"]=> string(1) "1" ["session.hash_bits_per_character"]=> string(1) "4" ["session.hash_function"]=> string(1) "0" ["session.name"]=> string(9) "PHPSESSID" ["session.referer_check"]=> string(0) "" ["session.save_handler"]=> string(5) "files" ["session.save_path"]=> string(0) "" ["session.serialize_handler"]=> string(3) "php" ["session.use_cookies"]=> string(1) "1" ["session.use_only_cookies"]=> string(1) "1" ["session.use_trans_sid"]=> string(1) "0" } array(0) { }
Output for 5.2.0 - 5.2.17
Warning: ini_get_all() expects at most 1 parameter, 2 given in /in/KddBL on line 5 array(5) { ["lifetime"]=> int(0) ["path"]=> string(1) "/" ["domain"]=> string(0) "" ["secure"]=> bool(false) ["httponly"]=> bool(false) } bool(false) array(0) { }
Output for 4.3.0 - 5.1.6
Warning: ini_get_all() expects at most 1 parameter, 2 given in /in/KddBL on line 5 array(4) { ["lifetime"]=> int(0) ["path"]=> string(1) "/" ["domain"]=> string(0) "" ["secure"]=> bool(false) } bool(false) array(0) { }