3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php session_start(); $_SESSION["number"]=1; $_SESSION["color1"]='red'; $_SESSION["color".$_SESSION["number"]]='red'; print_r($_SESSION);
based on qE7rk
Output for 5.2.3 - 7.2.0
Array ( [number] => 1 [color1] => red )
Output for 4.3.2 - 5.2.2
Warning: session_start(): Cannot send session cookie - headers already sent in /in/tdH60 on line 2 Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /in/tdH60:2) in /in/tdH60 on line 2 Array ( [number] => 1 [color1] => red )
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/tdH60 on line 2 Warning: session_start() [http://www.php.net/function.session-start]: Cannot send session cache limiter - headers already sent (output started at /in/tdH60:2) in /in/tdH60 on line 2 Array ( [number] => 1 [color1] => red )