3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $video_url = 'http://google.com'; $needles = array('http://', 'https://'); // Normalise the URLs foreach ($needles as $needle) { var_dump(strpos($video_url, $needle)); if (strpos($video_url, $needle) !== 0) { echo 'hello'; break; } } echo $video_url;
based on RGXec
Output for 4.3.0 - 5.6.28, hhvm-3.12.0, 7.0.0 - 7.1.0
int(0) bool(false) hellohttp://google.com
Output for hhvm-3.10.0

Process exited with code 153.