3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php echo($_SERVER['SERVER_NAME']); $a = 'opt.site.com'; $b = strpos($a, 'opt.'); if($b === 0) { echo 'pos 0'; } else { echo 'error!'; }
Output for 5.3.0 - 7.1.0
Notice: Undefined index: SERVER_NAME in /in/aWMF4 on line 2 pos 0
Output for 4.3.0 - 5.2.17
Notice: Undefined index: SERVER_NAME in /in/aWMF4 on line 2 pos 0