3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $file = 'http://simon.bennett.im'; if (preg_match('~^(?:f|ht)tps?://~i', substr($file, 0, 10))) { echo 'yes'; } else { echo 'no'; }
based on 6HrB3
Output for 4.3.0 - 7.1.0
yes