3v4l.org

run code in 300+ PHP versions simultaneously
<?php $paths = array( 'invalid path', 'http://myhost.com/image.jpg', 'https://mysslhost.com/image.jpg', ); foreach ($paths as $path) { $is_full_path = 0 !== preg_match('@^http:\/\/@', $path); echo $path . ' ' . ($is_full_path ? 'YES' : 'NO') . ' is a full path' . PHP_EOL; }

preferences:
54.91 ms | 402 KiB | 5 Q