3v4l.org

run code in 300+ PHP versions simultaneously
<?php $demostring = ' <p> Quis vel accusantium libero. Suscipit officiis culpa <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"> libero quia ad. </p> '; function ctf0_truncate($vinput){ return( preg_replace('/(data:image.{50})(.*)/', '$1', $vinput) ); } function ctf0_parse($text, $chars = 50) { if (strpos($text, 'data:image') !== FALSE){ $tokens = explode('"',$text); $tokens = array_map("ctf0_truncate",$tokens); $vout = implode('"',$tokens); } elseif( True ) { $vout = $text; } return $vout; } $myresult = ctf0_parse($demostring); echo $myresult;
Output for git.master, git.master_jit, rfc.property-hooks
<p> Quis vel accusantium libero. Suscipit officiis culpa <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALA"> libero quia ad. </p>

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:
155.3 ms | 405 KiB | 5 Q