3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $blogPostWord = 'http://youtu.be/O7Lm3BMG8ow'; preg_match('#(?<=(?:v|i)=)[a-zA-Z0-9-]+(?=&)|(?<=(?:v|i)\/)[^&\n]+|(?<=embed\/)[^"&\n]+|(?<=‌​(?:v|i)=)[^&\n]+|(?<=youtu.be\/)[^&\n]+#', $blogPostWord, $matches); var_dump($matches);
Output for 4.3.0 - 7.2.0
array(1) { [0]=> string(11) "O7Lm3BMG8ow" }