$url = 'https://www.youtube.com/watch?v=jlQLTVVHEYs';
$url = 'https://www.youtube.com/watch?v=jlQLTVVHEYs&ebc=ANyPxKp4JwKkDaL66YbSUSgV6U_SO5cg3iAnvhpd4A-ZvuG2KdIaUL5mu1Jq-RJBojeogNcMVvUsJcSz5I-79JMKeFANVHYW9Q';
$url = 'https://youtu.be/jlQLTVVHEYs';
$url = '<iframe width="560" height="315" src="https://www.youtube.com/embed/jlQLTVVHEYs" frameborder="0" allowfullscreen></iframe>';
if(preg_match('/youtube\.com\/embed\/([^"]+)/',$url,$match)){
 $videoId = $match[1]; 
}else if(preg_match('/\?v=([^&]+)/',$url,$match)){
 $videoId = $match[1];
}else if(preg_match('/youtu\.be\/(.*)/',$url,$match)){
 $videoId = $match[1];
}
echo $videoId;
exit;