3v4l.org

run code in 300+ PHP versions simultaneously
<?php $types = array( 'jsfiddle' => array( array( 'https?:\/\/(?:www)?\.?jsfiddle\.net[\w\/-]*\/([a-z\d]{8}(?:\/\d+)?)\/?', '<div class="jsfiddle-embed-wrap"><iframe class="iframe-jsfiddle" src="//jsfiddle.net/$1/embedded/result,js,html,css/"></iframe></div>' ), ), // youtube, replit, ... ); $text = 'https://jsfiddle.net/kai_noack/h1jf34za/11/'; foreach($types as $t => $ra) { // $t is youtube, jsfiddle, replit // $ra is array with replacements $ra[0] regex, $ra[1] embed code foreach($ra as $r) { $text = preg_replace('/<a[^>]+>'.$r[0].'<\/a>/i', $r[1], $text); $text = preg_replace('/(?<![\'"=])'.$r[0].'/i', $r[1], $text); } } echo $text;
Output for git.master, git.master_jit, rfc.property-hooks
<div class="jsfiddle-embed-wrap"><iframe class="iframe-jsfiddle" src="//jsfiddle.net/h1jf34za/11/embedded/result,js,html,css/"></iframe></div>

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:
66.22 ms | 401 KiB | 8 Q