3v4l.org

run code in 300+ PHP versions simultaneously
<?php function check_link($link) { if(preg_match('#v=\K[a-z\d-]+|v/\K[^&?"]+|v=\K[^&"]+|youtu\.be/\K[^&"]+#', $link, $r)) { echo $r[0]."\n"; $pattern = '#<a\s?href="(https?://(?:www\.)?[^"]+)">\1</a>#i'; 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
Z7Oc8QaM5VU <iframe width="560" height="315" src="https://www.youtube.com/embed/Z7Oc8QaM5VU" 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:
159.17 ms | 405 KiB | 5 Q