3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php for($f=file(__FILE__),$i=0;$i<10;$i++) { echo $f[$i]; } $l=0; foreach($_SERVER as $s) { if ($s=='ROZWAL') $l++; } echo(l); if ($l!=40) { die(); }
based on 68riZ
Output for 7.2.0
<?php for($f=file(__FILE__),$i=0;$i<10;$i++) { echo $f[$i]; } $l=0; foreach($_SERVER as $s) { if ($s=='ROZWAL') $l++; } echo(l); if ($l!=40) { Warning: Use of undefined constant l - assumed 'l' (this will throw an Error in a future version of PHP) in /in/r5HZv on line 9 l
Output for 5.3.18 - 7.1.10
<?php for($f=file(__FILE__),$i=0;$i<10;$i++) { echo $f[$i]; } $l=0; foreach($_SERVER as $s) { if ($s=='ROZWAL') $l++; } echo(l); if ($l!=40) { Notice: Use of undefined constant l - assumed 'l' in /in/r5HZv on line 9 l