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.4.3 - 5.2.2
<br /> <b>Warning</b>: session_start() [<a href='function.session-start'>function.session-start</a>]: Cannot send session cookie - headers already sent in <b>/in/WPj47</b> on line <b>2</b><br /> <br /> <b>Warning</b>: session_start() [<a href='function.session-start'>function.session-start</a>]: Cannot send session cache limiter - headers already sent (output started at /in/WPj47:2) in <b>/in/WPj47</b> on line <b>2</b><br /> string(3) "bar"
Output for 4.3.2 - 4.4.2
<br /> <b>Warning</b>: session_start(): Cannot send session cookie - headers already sent in <b>/in/WPj47</b> on line <b>2</b><br /> <br /> <b>Warning</b>: session_start(): Cannot send session cache limiter - headers already sent (output started at /in/WPj47:2) in <b>/in/WPj47</b> on line <b>2</b><br /> string(3) "bar"
Output for 4.3.0 - 4.3.1
<br /> <b>Warning</b>: session_start() [<a href='http://www.php.net/function.session-start'>function.session-start</a>]: Cannot send session cookie - headers already sent in <b>/in/WPj47</b> on line <b>2</b><br /> <br /> <b>Warning</b>: session_start() [<a href='http://www.php.net/function.session-start'>function.session-start</a>]: Cannot send session cache limiter - headers already sent (output started at /in/WPj47:2) in <b>/in/WPj47</b> on line <b>2</b><br /> string(3) "bar"