xxxxxxxxxx
if (preg_match('%(?:youtube(?:-nocookie)?\.com/(?:[^/]+/.+/|(?:v|e(?:mbed)?)/|.*[?&]v=)|youtu\.be/)([^"&?/\s]{11})%i', $url, $match)) {
$video_id = $match[1];
}
xxxxxxxxxx
git reflog
see all heads
git reset --hard HEAD~0
will go to latest commit.
git reset --hard HEAD~1
will go to last but one commit.