3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php session_start(); $a = array('foo'=>'bar'); $_SESSION['acc'] = $a; $_SESSION['foo'] = 'baz'; var_dump($_SESSION['acc']['foo']);
Output for 5.2.3 - 7.1.0
string(3) "bar"
Output for 4.3.2 - 5.2.2
Warning: session_start(): Cannot send session cookie - headers already sent in /in/U6h2k on line 3 Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /in/U6h2k:3) in /in/U6h2k on line 3 string(3) "bar"
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/U6h2k on line 3 Warning: session_start() [http://www.php.net/function.session-start]: Cannot send session cache limiter - headers already sent (output started at /in/U6h2k:3) in /in/U6h2k on line 3 string(3) "bar"