3v4l.org

run code in 300+ PHP versions simultaneously
<?php function check_link($link) { if(preg_match("#(?<=v=)[a-zA-Z0-9-]+(?=&)|(?<=v\/)[^&\n]+(?=\?)|(?<=v=)[^&\n]+|(?<=youtu.be/)[^&\n]+#", $link, $r)) { $pattern = '#<a\s?href="(https?:\/\/(?:www.)?[\w.\#\/?=]+)">\1<\/a>#is'; return preg_replace($pattern,'<iframe width="560" height="315" src="https://www.youtube.com/embed/'.$r[0].'" frameborder="0"></iframe>',$link); } } echo check_link('<a href="https://www.youtube.com/watch?v=Z7Oc8QaM5VU">https://www.youtube.com/watch?v=Z7Oc8QaM5VU</a>');
Output for git.master, git.master_jit, rfc.property-hooks
<iframe width="560" height="315" src="https://www.youtube.com/embed/Z7Oc8QaM5VU">https://www.youtube.com/watch?v=Z7Oc8QaM5VU</a>" frameborder="0"></iframe>

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
177.58 ms | 405 KiB | 5 Q