3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php session_name('a'.time().'a'); session_start(); for($f=file(__FILE__),$i=0;$i<10;$i++) echo $f[$i]; if (session_id()!=='1337') die(); $_SESSION['DobuleSynchronization']=time();
Output for 5.3.0 - 5.6.30, 7.0.0 - 7.3.0beta1
<?php session_name('a'.time().'a'); session_start(); for($f=file(__FILE__),$i=0;$i<10;$i++) echo $f[$i]; if (session_id()!=='1337') die(); $_SESSION['DobuleSynchronization']=time(); Notice: Undefined offset: 9 in /in/9THYj on line 5
Output for hhvm-3.10.1 - 3.21.0
<?php session_name('a'.time().'a'); session_start(); for($f=file(__FILE__),$i=0;$i<10;$i++) echo $f[$i]; if (session_id()!=='1337') die(); $_SESSION['DobuleSynchronization']=time(); Notice: Undefined index: 9 in /in/9THYj on line 5
Output for 5.2.3 - 5.2.17
<?php session_name('a'.time().'a'); session_start(); for($f=file(__FILE__),$i=0;$i<10;$i++) echo $f[$i]; if (session_id()!=='1337') die(); $_SESSION['DobuleSynchronization']=time(); Notice: Undefined offset: 9 in /in/9THYj on line 5
Output for 4.3.2 - 5.2.2
Warning: session_start(): Cannot send session cookie - headers already sent in /in/9THYj on line 3 Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /in/9THYj:3) in /in/9THYj on line 3 <?php session_name('a'.time().'a'); session_start(); for($f=file(__FILE__),$i=0;$i<10;$i++) echo $f[$i]; if (session_id()!=='1337') die(); $_SESSION['DobuleSynchronization']=time(); Notice: Undefined offset: 9 in /in/9THYj on line 5
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/9THYj 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/9THYj:3) in /in/9THYj on line 3 <?php session_name('a'.time().'a'); session_start(); for($f=file(__FILE__),$i=0;$i<10;$i++) echo $f[$i]; if (session_id()!=='1337') die(); $_SESSION['DobuleSynchronization']=time(); Notice: Undefined offset: 9 in /in/9THYj on line 5