3v4l.org

run code in 300+ PHP versions simultaneously
<?php $html = <<<HTML <figure data-trix-attachment="{&quot;content&quot;:&quot;<span class=\&quot;trix-token\&quot; data-token-id=\&quot;landlord_name\&quot;>Jméno pronajímatele</span>&quot;}" data-trix-content-type="undefined" class="attachment attachment--content"><span class="trix-token">Jméno pronajímatele</span><figcaption class="attachment__caption"></figcaption></figure> HTML; $figureOpenTagPattern = \sprintf('<figure data-token-id="%s"[^>]*>','landlord_name'); $figureOpenTagReplacement = \sprintf('<figure data-token-id="%s">', 'landlord_name'); $figureEndTag = '<\/figure>'; $html = \preg_replace( '/' . $figureOpenTagPattern . '(.+)' . $figureEndTag . '/U', $figureOpenTagReplacement . \sprintf('<span class="trix-token %s %s" data-token-id="%s">%s</span>', 'landlord_name', 'tokenClass', 'landlord_name', 'test') . '</figure>', $html, ); echo $html;
Output for git.master_jit, git.master
<figure data-trix-attachment="{&quot;content&quot;:&quot;<span class=\&quot;trix-token\&quot; data-token-id=\&quot;landlord_name\&quot;>Jméno pronajímatele</span>&quot;}" data-trix-content-type="undefined" class="attachment attachment--content"><span class="trix-token">Jméno pronajímatele</span><figcaption class="attachment__caption"></figcaption></figure>

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:
56.52 ms | 406 KiB | 5 Q