- Output for 5.4.0 - 5.4.34
- Fatal error: Cannot break/continue 2 levels in /in/Bb3mf on line 12
Process exited with code 255.
<?php
$video_url = 'http://google.com';
$needles = array('http://', 'https://');
// Normalise the URLs
foreach ($needles as $needle) {
if ( strpos($video_url, $needle) !== 0 ) {
$video_url = 'http://' . $video_url;
break 2;
}
}
echo $video_url;