3v4l.org

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